turingschool-examples / intermission-assignments

33 stars 218 forks source link

JavaScript Garden #13

Closed EmilyMB closed 9 years ago

EmilyMB commented 9 years ago

Discuss JavaScript Garden here.

Jwan622 commented 9 years ago

This was kind of enlightening.... and I think semi-colons as a general rule follow expressions?

Expressions

An expression produces a value and can be written wherever a value is expected—for example, as an argument in a function call or at the right side of an assignment. Each of the following lines contains an expression: myvar 3 + x myfunc('a', 'b')

Statements

Roughly, a statement performs an action. Loops and if statements are examples of statements. A program is basically a sequence of statements.[6] Wherever JavaScript expects a statement, you can also write an expression. Such a statement is called an expression statement. The reverse does not hold: you cannot write a statement where JavaScript expects an expression. For example, an if statement cannot become the argument of a function.

nathanows commented 9 years ago

Honestly, this one was a little advanced for my 'style of JS'... It seems like there is probably good stuff in here with more exposure, and hopefully reading through it will subconsciously trigger something if I run in to one of these situations. I've definitely got it bookmarked as a 'to be re-read'.

Lydias303 commented 9 years ago

I found a couple things to be interesting but over all not very helpful for a novice such as myself.

bmrsny commented 9 years ago

I felt semi-comfortable at the beginning of this read. About two paragraphs later I felt pretty lost. I kind of moved towards another source to get a better foundation. I started reading this free book. http://www.it-ebooks.info/book/483/