Find a flaw.
>>58616563
/thread
>>58616579
>>58616563
>Find a flaw.
meme spam outside of /b/
>>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.
>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
>>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
>>58616563
>>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.
>>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.
>>58616563
ransomware