#javascriptbugs — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #javascriptbugs, 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
-
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
-
Object Keys Get REORDERED Automatically?!
🚨 THIS IS INSANE! JavaScript silently reorders your object keys! Numbers get sorted, but '01' vs '1' behave differently. Your API response order might be LYING to you! This causes real security bugs!
#javascript #javascripttricks #codingchallenge #javascriptobjects #objectkeys #javascriptquiz #javascriptweird #javascriptwtf #javascriptbugs #codinginterview #json #javascriptshorts
-
void Operator ERASES Any Value?!
The void operator is JavaScript's BLACK HOLE! It takes ANY expression and returns undefined. Even when the function returns 42, void turns it into NOTHING! This ancient operator will confuse everyone!
#javascript #javascripttricks #voidoperator #undefined #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #operatorquirks #javascriptbugs #advancedjavascript
-
finally{} OVERRIDES return Statement?!
💥 WATCH THIS NOW! finally block KILLS your return statement! try returns 'A', but finally returns 'B' - guess which one wins? This silent behavior has caused millions in production bugs! Share this NOW!
#javascript #javascripttricks #codingchallenge #trycatchfinally #returnstatement #javascriptquiz #javascriptweird #javascriptwtf #javascriptbugs #codinginterview #errorhandling #javascriptshorts
-
WeakMap REJECTS Primitive Keys?!
WeakMap has a SECRET rule! It ONLY accepts objects as keys. Try to use a string and it FAILS silently. This hidden restriction will cause bugs you'll never find!
#javascript #javascripttricks #weakmap #objectkeys #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #weakreferences #javascriptbugs #advancedjavascript
-
Proxy Returns Function That Executes Itself?!
This Proxy BREAKS all rules! When you access ANY property, it returns a function that executes immediately. The property name becomes the function result. This is INSANE behavior that will break your brain!
#javascript #javascripttricks #proxy #gettrap #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #proxytraps #javascriptbugs #advancedjavascript
-
Array.from() With Sparse Arrays?!
Array.from() has hidden behavior with sparse arrays! Creating arrays this way creates something unexpected. Watch this!
#javascript #javascripttricks #codingtips #programmingtutorial #array.from #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #sparsearrays #javascriptwtf #arrayconversion
-
"10" > "2" Is FALSE?!
JavaScript string comparison is backwards! Comparing "10" and "2" gives the WRONG answer. This breaks sorting! Watch this!
#javascript #javascripttricks #codingtips #programmingtutorial #stringcomparison #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #lexicographic #javascriptwtf #comparisonbug
-
"10" > "2" Is FALSE?!
JavaScript string comparison is backwards! Comparing "10" and "2" gives the WRONG answer. This breaks sorting! Watch this!
#javascript #javascripttricks #codingtips #programmingtutorial #stringcomparison #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #lexicographic #javascriptwtf #comparisonbug
-
"10" > "2" Is FALSE?!
JavaScript string comparison is backwards! Comparing "10" and "2" gives the WRONG answer. This breaks sorting! Watch this!
#javascript #javascripttricks #codingtips #programmingtutorial #stringcomparison #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #lexicographic #javascriptwtf #comparisonbug
-
"10" > "2" Is FALSE?!
JavaScript string comparison is backwards! Comparing "10" and "2" gives the WRONG answer. This breaks sorting! Watch this!
#javascript #javascripttricks #codingtips #programmingtutorial #stringcomparison #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #lexicographic #javascriptwtf #comparisonbug
-
"10" > "2" Is FALSE?!
JavaScript string comparison is backwards! Comparing "10" and "2" gives the WRONG answer. This breaks sorting! Watch this!
#javascript #javascripttricks #codingtips #programmingtutorial #stringcomparison #javascriptquiz #codingchallenge #javascriptshorts #javascriptbugs #lexicographic #javascriptwtf #comparisonbug