#javascriptquiz — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #javascriptquiz, aggregated by home.social.
-
Math.min() > Math.max() Returns TRUE?!
⚠️ YOUR BRAIN WILL EXPLODE! Math.min() is GREATER than Math.max()! This breaks EVERY rule of mathematics! The answer will shock you. 97% of developers get this wrong!
#javascript #javascripttricks #codingchallenge #math.min #math.max #javascriptquiz #javascriptweird #javascriptwtf #mindblown #javascriptbugs #codingtips #javascriptshorts
-
Reflect API Shows HIDDEN Properties?!
Reflect.ownKeys REVEALS secrets! It shows non-enumerable properties that Object.keys hides. This is how you see ALL properties, even hidden ones!
#javascript #javascripttricks #reflectapi #propertyenumeration #hiddenproperties #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #reflection #advancedjavascript
-
void Operator Returns WHAT?!
🤯 MIND BLOWN! The void operator ALWAYS returns undefined, no matter what! void(1+2+3) = undefined! This ancient JavaScript feature is still used in modern code. 95% of devs don't know this exists!
#javascript #javascripttricks #codingchallenge #voidoperator #javascriptoperators #javascriptquiz #javascriptweird #javascriptwtf #javascriptsecrets #codingtips #javascriptshorts
-
Constructor Can Return DIFFERENT Object?!
Constructors can LIE about what they create! If you return an object, it REPLACES the instance. The 'new' keyword becomes USELESS. instanceof returns false! This breaks OOP principles!
#javascript #javascripttricks #constructor #classsyntax #instanceof #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #oopquirks #advancedjavascript
-
typeof Works in Temporal Dead Zone?!
Temporal Dead Zone has a LOOPHOLE! typeof works on undeclared variables (returns undefined) but throws ReferenceError for let/const. This inconsistency is INSANE!
#javascript #javascripttricks #tdz #temporaldeadzone #typeof #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #variablehoisting #advancedjavascript
-
Array(3) vs [,,,] Are NOT The Same!
Creating arrays in JavaScript has a hidden trap! Array(3) and [,,,] look identical but behave completely differently. Mind blown!
#javascript #javascripttricks #codingtips #programmingtutorial #arrayconstructor #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #sparsearrays #javascriptwtf #arraycreation
-
with() Changes Variable Scope?!
💥 DEPRECATED BUT STILL WORKS! The 'with' statement changes your scope and makes variables magically refer to object properties! Banned in strict mode but still in old codebases. This caused HUGE security bugs!
#javascript #javascripttricks #codingchallenge #withstatement #scope #javascriptquiz #javascriptweird #javascriptwtf #deprecated #javascriptbugs #javascriptshorts
-
with() Changes Variable Scope?!
💥 DEPRECATED BUT STILL WORKS! The 'with' statement changes your scope and makes variables magically refer to object properties! Banned in strict mode but still in old codebases. This caused HUGE security bugs!
#javascript #javascripttricks #codingchallenge #withstatement #scope #javascriptquiz #javascriptweird #javascriptwtf #deprecated #javascriptbugs #javascriptshorts
-
with() Changes Variable Scope?!
💥 DEPRECATED BUT STILL WORKS! The 'with' statement changes your scope and makes variables magically refer to object properties! Banned in strict mode but still in old codebases. This caused HUGE security bugs!
#javascript #javascripttricks #codingchallenge #withstatement #scope #javascriptquiz #javascriptweird #javascriptwtf #deprecated #javascriptbugs #javascriptshorts
-
with() Changes Variable Scope?!
💥 DEPRECATED BUT STILL WORKS! The 'with' statement changes your scope and makes variables magically refer to object properties! Banned in strict mode but still in old codebases. This caused HUGE security bugs!
#javascript #javascripttricks #codingchallenge #withstatement #scope #javascriptquiz #javascriptweird #javascriptwtf #deprecated #javascriptbugs #javascriptshorts
-
with() Changes Variable Scope?!
💥 DEPRECATED BUT STILL WORKS! The 'with' statement changes your scope and makes variables magically refer to object properties! Banned in strict mode but still in old codebases. This caused HUGE security bugs!
#javascript #javascripttricks #codingchallenge #withstatement #scope #javascriptquiz #javascriptweird #javascriptwtf #deprecated #javascriptbugs #javascriptshorts
-
typeof Never Throws Error?!
typeof is INDESTRUCTIBLE! It works on undeclared variables WITHOUT throwing ReferenceError. Both declared undefined AND never-declared return 'undefined'. You can't tell them apart! This is INSANE!
#javascript #javascripttricks #typeof #undeclaredvariables #referenceerror #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #typechecking #advancedjavascript
-
Nullish Coalescing vs Logical OR?!
?? and || are DIFFERENT! Nullish coalescing only checks null/undefined. Logical OR checks ALL falsy values. 0 and '' behave differently! This matters!
#javascript #javascripttricks #nullishcoalescing #logicalor #falsyvalues #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #operatordifferences #advancedjavascript
-
Generator yield* Delegates to Another?!
Generators can DELEGATE to other generators! The yield* syntax passes control to another generator. This creates generator chains that will confuse you!
#javascript #javascripttricks #generators #yield* #delegation #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #generatorchains #advancedjavascript
-
Symbol.iterator Creates INFINITE Sequence?!
Custom iterators can generate INFINITE sequences! This object never ends, but spread operator can slice it. This is how generators break the rules of finite data!
#javascript #javascripttricks #symbol.iterator #generators #infinitesequences #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #iterators #advancedjavascript