This is fucking disgusting. Javascript is awful. I was almost over the lack of neat data types, but I can't handle this. HTML was so gross I could hardly wait to get to programming, and then I find out the language I'd be using is even worse. I give up. I'd rather wipe people's asses for a living than be a web developer because it would be cleaner.
>>62143179
>I'd rather wipe people's asses for a living than be a web developer because it would be cleaner.
Wait till you have babies.
Also: HTML+JS is not so bad. At least it allows you to indent or not indent your code, as you please.
>implying all web development is frontend javascript
Lel
>>62143179
>getting triggered over json
>getting triggered over the LEAST offensive part of javascript
>>62143179
OP is a homo
>>62143179
you didn't see shit yet
>>62143179
What exactly is the problem? Can you explain it like a sane person instead of sperging out like some triggered SJW?
Did OP run away in shame? Hello?
>>62143179
you can drop the quotes on keys mongrel
>>62144183
In Javascript you can, but not in JSON.
>>62144219
And OP posted javascript, so he can drop the quotes.
>>62144262
But maybe he copied from some JSON document. Dropping quotes would be just extra work that achieves nothing.
>var
Can't wait for OP to die in a fit of autistic rage when he finds out about hoisting.
>>62144280
saves space
>>62144283
Eh? This seems completely harmless to me. A much bigger problem is that scopes are function-level, not block-level.
From that stack website:var closures = [];
function create() {
for (var i = 0; i < 5; i++) {
closures[i] = function() {
alert("i = " + i);
};
}
}
function run() {
for (var i = 0; i < 5; i++) {
closures[i]();
}
}
create();
run();
Outputs 5,5,5,5,5, although it's reasonable to expect it to output 1,2,3,4,5
>>62144298
time > space
>>62144333
var is scoped to the function, but it is deprecated.
Use let.
>>62144333
not if you get money for time
>>62144381
Neat. Outputs 12345 with let. How's browser support for let?
>>62144416
Pretty much every mainstream browser. The days of waiting for IE are long over.