Metal Toad University - Class #4: JavaScript!

Want to catch up with Metal Toad University? Go through the previous classes here!


The fourth class we held was an intro to JavaScript (JS), guest hosted by Robbie Ferrero.

Robbie gave us a great presentation on what JS is and how to use it. We covered the basics like what a variable is and what a function is. At the end, I demoed a small piece of code that I wrote during that class. It allowed me to demonstrate some JS in action.

There was a small piece of 'homework' given by another fellow toad, Tom Martin. He suggested that students try to recreate their Facebook profile page on their own. As we are not a traditional school/class, our 'homework' is completely optional.

This week we'll be doing some web design! We'll walk through some basic ideas about web design and work on our first real project.

Be sure to check out the video below if you missed it.

Filed under:

Comments

So I played with the console a bit after watching the video. I found out that writing an object with more than one key without assignment will return a syntax error.

e.g. if you type {fee: 'fi', foo: 'bar'} you will get the following syntax error: "SyntaxError: Unexpected token :"

However, if you assign this object to a variable it will work as expected.

e.g.
Typed: var beep = {fee: 'fi', foo: 'bar'}
Output: undefined
Typed: beep
Output: Object
fee: "fi"
foo: "bar"
__proto__: Object

I'm not sure exactly why this is, but there you go.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <cpp>, <java>, <php>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Ready for transformation?