Javascript Weird Parts [portable] Official

const arr = [1, 2, 3]; const obj = { a: 1 }; console.log(arr + arr); // "1,2,31,2,3" (string) console.log(arr + obj); // "1,2,3[object Object]"

false , 0 , -0 , 0n (BigInt zero), "" , null , undefined , NaN . javascript weird parts

const obj = { show }; obj.show(); // obj const arr = [1, 2, 3]; const obj = { a: 1 }; console

JavaScript is the most misunderstood language in the world. Some call it broken; others call it beautiful. The truth? It’s both. const arr = [1

Arrow functions don't have their own this —they inherit from the parent scope. That’s often a lifesaver, but it’s another thing to memorize. Every value in JS is inherently truthy or falsy. There are exactly 8 falsy values :