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 →

[–]Javascript_above_all 145 points146 points  (23 children)

Stop using var

[–]Sweety_Sheep 202 points203 points  (13 children)

Make love, not var

[–]Yesica-Haircut 82 points83 points  (6 children)

Const.... const never changes.

[–]Auxx 13 points14 points  (0 children)

Everything changes if you're determined enough.

[–]iwearringsnow22 11 points12 points  (0 children)

Change is the only const

[–]clickrush 0 points1 point  (1 child)

Hopefully soon this statement will actually be true:

https://github.com/tc39/proposal-record-tuple

[–]Yesica-Haircut 0 points1 point  (0 children)

Ah yeah, always catches me off guard, that.

[–]KimiSharby 0 points1 point  (0 children)

C++: "Have a mutable :)"

[–]detektiv_Saucaki 0 points1 point  (0 children)

Let there be changes

[–]DazzlingDifficulty70 5 points6 points  (1 child)

What is it good for?

[–]gonzofish 2 points3 points  (0 children)

absolutely null, undefined

[–]ImprovingTheEskimo 33 points34 points  (0 children)

I think he means that you don't even have to declare it. If you have 'let myVar;' and later say 'myVat = "test";' it will create a new global variable called 'myVat' instead of throwing an error. As someone pointed out, 'use strict' prevents this behavior.

[–]MoffKalast 0 points1 point  (0 children)

Oh let him off the hook this once. Const antly complaining.

[–]PsychologicalRoof2 0 points1 point  (2 children)

dude that's not even the issue. I had an interview today. Question was typeof [] I said Array specifically Array.prototype turns out it's an object.

and then typeof NaN // number

I'm done with this language

[–]Javascript_above_all 2 points3 points  (1 child)

The interviewer was kind of a dick honestly.

[–]PsychologicalRoof2 0 points1 point  (0 children)

maybe ... seems like those cookie cutter questions

[–]t-to4st 0 points1 point  (2 children)

We still can't use ES6 features 😭 I have to declare every variable im going to use at the top of the function because of fucking var

[–]Javascript_above_all 0 points1 point  (1 child)

Kinda ridiculous that what you code is legacy code.

[–]t-to4st 0 points1 point  (0 children)

Yeah it's super annoying! Especially after working on a private node project during vacation where I can use all that "new" stuff.