The Weird Parts of JavaScript

[ad_1] @jcwiiJ Chris Wingeier II🤖 jcwii.com 🤖Gotcha with a catchy title. Punchline: it's all weird. Case closed.Nah just kidding but since you're here to stay a little while, hear me out. I'll run through some cross-language similarities but mostly point out key differences and by the end you may just agree that not all that is weird is bad. After all some of the weirdness is uniquely powerful and to harness it you'll just have to deal with the weird parts of JavaScript.JavaScript powers the Internet. Sure HTML is the only in-browser language that's absolutely necessary to render web pages in a web browser, but go ahead and disable JavaScript in yours and see how far you can get along on your daily routine. In fact users can neither sign up nor login to hackernoon.com without it enabled. Even with all of JavaScript's power and necessity many people claim to dislike the language, with lower level programmers especially scornful of it. A lot of the disdain has to do with how this language behaves differently than others, and plenty of perplexing console.log() screenshots float around the web to make the case.Comparing LanguagesFor many, a first ever glance at a JavaScript file will quickly resemble other programming language files. Sometimes code is imported from other locations at the top. Then comes functions and variables. Curly brace syntax is commonplace for many developers and is even quickly intuitive to Python monolinguists.For those well-versed in JavaScript (JS) it may come as a surprise that keywords promoted for use in modern JS (ES6+) are not unique. "async",...