DEV Community

Cover image for Strange Behavior in JavaScript

Strange Behavior in JavaScript

Sukhpinder Singh on May 12, 2021

There are numerous occasions where JavaScript behaves strangely. I love the frameworks written on top of javascript but do not prefer to...
Collapse
 
akoskm profile image
Akos • Edited

It is not. Most of the problems you're going to solve with JavaScript in any real-world application are from a completely different domain.

EDIT

I made this comment while the title of the post was "Why is JavaScript so hated?".

Collapse
 
ssukhpinder profile image
Sukhpinder Singh

Yes you are right and I agree but I just wanted to share the use cases where javascript behaves strangely..!!

Collapse
 
oskarcodes profile image
Oskar Codes

You should rename this article to « Strange Behavior in JavaScript ». JavaScript is in no way a hated language.

Collapse
 
ssukhpinder profile image
Sukhpinder Singh

Done....changed. Thanks for your recommendation..!! Really appreciate it.

Collapse
 
lexlohr profile image
Alex Lohr

Yes, Javascript has its quirks, but what you describe is defined functionality of the language. Reading the ECMAscript standards will fix your wrong expectations about it.

Collapse
 
ssukhpinder profile image
Sukhpinder Singh

Sure. I will have a look..!!

Collapse
 
mellen profile image
Matt Ellen-Tsivintzeli

Scenario 6 blew my mind! I did not know that's how the Array prototype worked.

Collapse
 
ssukhpinder profile image
Sukhpinder Singh

That actually inspired me to write this article...!! :D