I just found myself writting a variable called float and Sublime Text made it blue, like it would with "document" or "window". Then I tried to write that in Chrome's console and see what it was... but it seems like, at least, it is not a global variable.
What is float in Javascript and why is it a reserved word? May it be for a possible future use?
EDIT: For those downvoting: I found it actually is a reserved word here: http://www.w3schools.com/js/js_reserved.asp
EDIT2: As ES6 is adding real classes to JS, and it seems JS is looking more and more like Java, could it be possible that in the future you'd have to define a variable as Float my_number = 1.1234;
?
Why is “float” a reserved word in JavaScript?
- it's not. Probably some incorrect highlighting rules in your sublime – ApartheidFuture reserved keywords in older standards The following are reserved as future keywords by older ECMAScript specifications (ECMAScript 1 till 3).
– Depreciable