| Moto Hell - The Motorola Modding Community |
|
December 14, 2025, 03:02:16 am
|
|||
|
|||
| News: The forum is no longer active and registration is disabled; however you can still fetch everything as guest. |
| Home | Help | Search | Calendar | Login | Register |
And arrow functions? They don’t have their own this at all—they inherit from the surrounding scope. Arrays in JS are just objects with numeric keys and a special length property. That means you can do... questionable things.
You are not alone. JavaScript is the quirky, misunderstood genius of the programming world. It was built in 10 days, it drives the modern web, and it has a list of "features" that look more like bugs. js the weird parts
If you’ve spent more than five minutes writing JavaScript, you’ve probably had a moment where you stared at your screen and whispered, “...why?” And arrow functions
const bound = showThis.bind("hello"); bound(); // String {"hello"} That means you can do
console.log(isNaN(NaN)); // true // But wait... console.log(isNaN("hello")); // true (because "hello" can't be a number) That’s why ES6 gave us Number.isNaN() which actually behaves. In many languages, if you forget to declare a variable, you get an error. In JavaScript (non-strict mode), you get a present :
function showThis() { console.log(this); } showThis(); // window (or undefined in strict mode)