[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]

Find a flaw.

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: 36
Thread images: 10

File: JS.png (2KB, 225x225px) Image search: [Google]
JS.png
2KB, 225x225px
Find a flaw.
>>
File: file.png (48KB, 314x290px) Image search: [Google]
file.png
48KB, 314x290px
>>
>>58616563
/thread
>>58616579
>>
>>58616563
>Find a flaw.
meme spam outside of /b/
>>
File: file.png (57KB, 321x449px) Image search: [Google]
file.png
57KB, 321x449px
>>58616579
>>
>>58616563
It would be harder if you asked "Find something that isn't a flaw"
>>
js is an ableist language. kinda phallic. its kinda unsafe and hurts to debug
>>
now that we're using typescript at work, i can't.
>>
File: resistance is futile.png (32KB, 1118x587px) Image search: [Google]
resistance is futile.png
32KB, 1118x587px
>find a flaw
Browsers
>>
>>58616563
>Find a flaw.
- Weak dynamic typing where "2" + 2 does not behave the same way "2" - 2 does

- Implicitly inserted semicolons

- Implicit global scoping and lack of proper block scope (JS uses function scope)
>>
>>58616757
>>58616728
>>58616695
>>58616639
>>58616612
>>58616586
>>58616584
>>58616579

damn niggas did JS fuck yo bitch or something? y'all being sour af
>>
File: femiscript.jpg (56KB, 400x400px) Image search: [Google]
femiscript.jpg
56KB, 400x400px
>>58616563
born deficient. even tried to mimic the name of a real programming language
>>
>>58616791
Please refrain from using ebonics. This is a civilized place.
>>
>>58616792
>java
>real programming language

Hello Rajesh
>>
>>58616802

s-sorry
>>
>>58616807
keep trying kid
>>
god LITERALLY created javascript in seven days
and saw it was good
>>
File: B87zYaFIUAAuGtx.png (36KB, 473x328px) Image search: [Google]
B87zYaFIUAAuGtx.png
36KB, 473x328px
>>58616563
>>
File: JS.png (6KB, 674x633px) Image search: [Google]
JS.png
6KB, 674x633px
>>58616563

== == ===
== !== ===
>>
>>58617130

JS is a huge clusterfuck, but all the examples in your pic make sense if you just understand that you can ADD strings (concat) but not SUBSTRACT them. So when you use a minus it has to cast to number.

Therefore:
// "oh, you want to use '+' as concat operation"
'5' + x - x == '5' + 0 == '5' + '0'

// "oh, you want to use '-' on a string? I have to cast it to a number"
'5' - x + x == '5' - 0 == 5 - 0


Also the "+ +" imply castings because of unary mathematical operations:

'5' + + '5' == '5' + (+'5') == '5' + (+5) == '5' + 5 == '5' + '5' == '55'

'foo' + + 'foo' == 'foo' + (+'foo') == 'foo' + (NaN) == 'foo' + NaN == 'foo' + 'NaN' == 'fooNaN'



It's not that hard when you think about it, just remember that '+' is overloaded for strings and JS evaluates by putting things into parentheses and trying to reason about it.
>>
typecasting was a mistake
>>
It's like the beautiful language of Lua but so, so much worse
>>
>>
>>58616563
What is Head First Java equivalent for JS
?
>>
>>58618022
Are you serious, anon? It's called Head First Javascript. There's also Head First Javascript Programming but I don't know what the difference is between the two.
>>
>>58618101
Head First Java is considered one of the best JAVA and OOP intro books, but most of HEAD First series is not as good thoug
>>
>>58618188
I'd say it was a pretty solid book. I used it with W3 and Codecademy. If I didn't understand a chapter then I'd just blaze through the CA course for it and reread it.

I'm just a """web designer""" though so I can't speak from a "real programmer" standpoint.
>>
>>58618022
Eloquent Javascript is pretty good desu
>>
>>58617335
>JS is a huge clusterfuck, but all the examples in your pic make sense if you just understand that you can ADD strings (concat) but not SUBSTRACT them.
Thats the point, it's fucking retarded to make the concat operator the same as the addition operator in a weakly typed language. Lua and PHP for instance solve this problem with a special concat operator (.. and .).
>>
>>58618433
They could have overloaded - for strings so that for string1 - string2 it removes all occurences of string2 out of string1.
>>
File: are you talking to me.webm (2MB, 720x360px) Image search: [Google]
are you talking to me.webm
2MB, 720x360px
>>58617347
>mfw CIS cannot accept js is type fluid
>>
>>58616757
Are you from 2005?
>>
>>58618733

In Ruby you have something similar for arrays:

["a", "b", "c"] - ["b"]   # returns ["a", "c"]


But you could use it for Strings like this:
("ACAB".chars - "A".chars).join  # returns "CB"] 
>>
>>58616563
Easy. No private methods in ES6 classes.
>>
File: javascript_good_versus_bad[1].jpg (133KB, 500x299px) Image search: [Google]
javascript_good_versus_bad[1].jpg
133KB, 500x299px
>>58616563
>>
ransomware
Thread posts: 36
Thread images: 10


[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.