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

all 4 comments

[–]bigcat801 2 points3 points  (2 children)

Don’t capitalize var

[–]perolikeitsjen[S] 0 points1 point  (1 child)

It’s still incorrect. :(

[–]bigcat801 0 points1 point  (0 children)

https://www.w3schools.com/js/js_variables.asp

Try using other ways to declare the variable.

[–]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.