Below is how the above code would look in a browser.
The write here is actually one of the document's methods. Methods generally have arguments, and in this case, the <p>Hello!</p> is the argument.
Now let's understand an object's property.
In this example, you can see that we use the document's property, document.location, as an argument for the method, document.write. The document.location is equal to , but since it was in the method document.write, it actually wrote that to the DOM so that we could see it.
Your code will execute in this window.
Let's explore some more tutorials or topics!
khanAca18 Dec. 5, 2016, 12:05 a.m.Mabye you should teach the user the language the way they do it on Khan Academy and then teach them how to put it in webpages.
mgymnast March 11, 2014, 12:09 p.m.It doesn't teach you much. It should have more examples where the thing we are learning is highlighted so I know what to loo at. Needs some more work.
Florin Tudor Nov. 14, 2013, 1:17 a.m.Very good test