For this lecture, I made a quick-start with JS (HTML was involved as well). Basically what I did was create a new folder in the editor and used an HTML file as follows:

Screen Shot 2018-03-28 at 2.51.50 pm.png

What we explored was the two ways of embedding JS into an HTML file. You can do it with inline script or by linking to a JS file. Today I experimented using JS to print ‘Hello World!’ to the console with both methods.

The JS file I created is very simple:

console.log('Hello World!')

It threw an error saying the console was undefined, even though I seemed to follow the instructions. And it worked as intended. Perhaps the reasons for that will become clear.

It was satisfying to see something I made open up in a web browser. Find it below. The text is simply the notes I took during the lecture, writing it at the bottom of the HTML document.

Screen Shot 2018-03-28 at 2.47.25 pm.png

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s