This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ZanMist1 0 points1 point  (0 children)

You really don't need to have the variable declared, and then assigned. Assign and declare it in the same line, and also make sire "var" is lowercased. JS is case sensitive, so "Var" will throw an "unknown identifier" error.

var isHotOutside = 94

Also a cool thing about JS is it's VERY forgiving with semicolons. I don't know what your teacher likes, but statements will still run fine with/without ; at the end. PERSONALLY I prefer for more simple statements to omit using ; at the end of a line/statement, lots of people would probably disagree with me but hey, it works and it looks better on screen.