get it on google playCreated with Sketch.
JavaScript> Accessing and setting content

Accessing and setting content

The element stored in paragraph has no text so we need paragraph.innerHTML to change that.

 <body>
  <h2>New Messages</h2>
  <script>
   var paragraph = document.createElement("p");
   paragraph.innerHTML;
  </script>
 </body>

To set the text of the new paragraph, code an equal sign followed by a string value.

 <body>
  <h2>New Messages</h2>
  <script>
   var paragraph = document.createElement("p");
   paragraph.innerHTML = "Joe: football?";
  </script>
 </body>
TRY IT ON THE APP