[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

This is fucking disgusting. Javascript is awful. I was almost

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 20
Thread images: 1

File: Capture.jpg (16KB, 265x129px) Image search: [Google]
Capture.jpg
16KB, 265x129px
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.
Thread posts: 20
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.