3 ms·
strange, I always put quote marks, as I see them as totally necessary. Not in the browser, obviously, but in my mind. It helps me recording those are strings, n
by _ZeD_ 10y ago
strange, I always put quote marks, as I see them as totally necessary. Not in the browser, obviously, but in my mind. It helps me recording those are strings, not variables. I made too many mistakes in the likes of
var foo = "bar";
var baz = {
foo: "qux"
};
- vog 10y agoThis bites especially often if you are steadily switching between JavaScript and a server-side language where that code actually does what you expect (e.g. Python).
- mjmasn 10y agoI assume you mean you mistakenly expect baz to equal: { bar: "qux" } ? Don't you use syntax highlighting? I can't imagine this ever being an issue...