createTextNode

Creates a text string from the specified value.

Parameters

data

String that specifies the nodeValue property of the text node.

MDN Reference