Creates a text node for the given string and appends it to the given parent. Returns the text node.

  • Parameters

    • parent: Element

      DOM node to append the text node to.

    • text: string

      String representing the text to be added.

    Returns Text