home.social

#javascriptshorts — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #javascriptshorts, aggregated by home.social.

  1. You Can Use Same Variable Name TWICE?!

    🔥 NO WAY! Destructuring allows DUPLICATE variable names in the same statement! const {a, a} = obj is VALID JavaScript! Last one silently wins. ESLint doesn't catch this by default. Tag a dev who needs to see this!

    #javascript #javascripttricks #codingchallenge #destructuring #javascriptes6 #javascriptquiz #javascriptweird #javascriptwtf #javascriptbugs #codinginterview #codingtips #javascriptshorts

    youtube.com/watch?v=1fs8zval7Hk

  2. Promise.resolve UNWRAPS Thenables?!

    Promise.resolve has RECURSIVE unwrapping! Any object with a 'then' method gets called. Nested thenables unwrap ALL the way down until a real value appears. This automatic unwrapping will confuse your async code!

    #javascript #javascripttricks #promise.resolve #thenables #asyncunwrapping #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #promisequirks #advancedjavascript

    youtube.com/watch?v=7gDt_tC_Jw8

  3. 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

    youtube.com/watch?v=au8mR2rlVgo

  4. 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

    youtube.com/watch?v=au8mR2rlVgo

  5. 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

    youtube.com/watch?v=au8mR2rlVgo

  6. 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

    youtube.com/watch?v=au8mR2rlVgo

  7. 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

    youtube.com/watch?v=au8mR2rlVgo

  8. 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

    youtube.com/watch?v=eP1S-b28YM4

  9. 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

    youtube.com/watch?v=eP1S-b28YM4

  10. 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

    youtube.com/watch?v=eP1S-b28YM4

  11. 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

    youtube.com/watch?v=eP1S-b28YM4

  12. 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

    youtube.com/watch?v=eP1S-b28YM4

  13. 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

    youtube.com/watch?v=NSHaq1zbSWE

  14. 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

    youtube.com/watch?v=NSHaq1zbSWE

  15. 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

    youtube.com/watch?v=NSHaq1zbSWE

  16. 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

    youtube.com/watch?v=NSHaq1zbSWE

  17. 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

    youtube.com/watch?v=NSHaq1zbSWE

  18. Comma Operator Returns LAST Value Only?!

    ⚠️ THIS IS INSANE! The comma operator evaluates ALL expressions but returns ONLY the last one! (1,2,3,4,5) = 5! Used in for loops everywhere but nobody notices. Tag a dev who needs this!

    #javascript #javascripttricks #codingchallenge #commaoperator #javascriptoperators #javascriptquiz #javascriptweird #javascriptwtf #forloops #codinginterview #javascriptshorts

    youtube.com/watch?v=DEtGXfUIjsE

  19. Comma Operator Returns LAST Value Only?!

    ⚠️ THIS IS INSANE! The comma operator evaluates ALL expressions but returns ONLY the last one! (1,2,3,4,5) = 5! Used in for loops everywhere but nobody notices. Tag a dev who needs this!

    #javascript #javascripttricks #codingchallenge #commaoperator #javascriptoperators #javascriptquiz #javascriptweird #javascriptwtf #forloops #codinginterview #javascriptshorts

    youtube.com/watch?v=DEtGXfUIjsE

  20. Comma Operator Returns LAST Value Only?!

    ⚠️ THIS IS INSANE! The comma operator evaluates ALL expressions but returns ONLY the last one! (1,2,3,4,5) = 5! Used in for loops everywhere but nobody notices. Tag a dev who needs this!

    #javascript #javascripttricks #codingchallenge #commaoperator #javascriptoperators #javascriptquiz #javascriptweird #javascriptwtf #forloops #codinginterview #javascriptshorts

    youtube.com/watch?v=DEtGXfUIjsE

  21. Comma Operator Returns LAST Value Only?!

    ⚠️ THIS IS INSANE! The comma operator evaluates ALL expressions but returns ONLY the last one! (1,2,3,4,5) = 5! Used in for loops everywhere but nobody notices. Tag a dev who needs this!

    #javascript #javascripttricks #codingchallenge #commaoperator #javascriptoperators #javascriptquiz #javascriptweird #javascriptwtf #forloops #codinginterview #javascriptshorts

    youtube.com/watch?v=DEtGXfUIjsE

  22. Comma Operator Returns LAST Value Only?!

    ⚠️ THIS IS INSANE! The comma operator evaluates ALL expressions but returns ONLY the last one! (1,2,3,4,5) = 5! Used in for loops everywhere but nobody notices. Tag a dev who needs this!

    #javascript #javascripttricks #codingchallenge #commaoperator #javascriptoperators #javascriptquiz #javascriptweird #javascriptwtf #forloops #codinginterview #javascriptshorts

    youtube.com/watch?v=DEtGXfUIjsE

  23. 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

    youtube.com/watch?v=pnuVGVN9Kfk

  24. 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

    youtube.com/watch?v=pnuVGVN9Kfk

  25. 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

    youtube.com/watch?v=pnuVGVN9Kfk

  26. 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

    youtube.com/watch?v=pnuVGVN9Kfk

  27. 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

    youtube.com/watch?v=pnuVGVN9Kfk

  28. Object Keys Get AUTO-SORTED?!

    Object key order is NOT guaranteed! Numeric string keys get SORTED before other keys. You add 'b' first but '1' appears first in Object.keys()! This auto-sorting will DESTROY your expected order!

    #javascript #javascripttricks #object.keys #keyordering #numerickeys #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #objectquirks #advancedjavascript

    youtube.com/watch?v=yK-u-WHxO0o

  29. Object Keys Get AUTO-SORTED?!

    Object key order is NOT guaranteed! Numeric string keys get SORTED before other keys. You add 'b' first but '1' appears first in Object.keys()! This auto-sorting will DESTROY your expected order!

    #javascript #javascripttricks #object.keys #keyordering #numerickeys #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #objectquirks #advancedjavascript

    youtube.com/watch?v=yK-u-WHxO0o

  30. Object Keys Get AUTO-SORTED?!

    Object key order is NOT guaranteed! Numeric string keys get SORTED before other keys. You add 'b' first but '1' appears first in Object.keys()! This auto-sorting will DESTROY your expected order!

    #javascript #javascripttricks #object.keys #keyordering #numerickeys #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #objectquirks #advancedjavascript

    youtube.com/watch?v=yK-u-WHxO0o

  31. Object Keys Get AUTO-SORTED?!

    Object key order is NOT guaranteed! Numeric string keys get SORTED before other keys. You add 'b' first but '1' appears first in Object.keys()! This auto-sorting will DESTROY your expected order!

    #javascript #javascripttricks #object.keys #keyordering #numerickeys #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #objectquirks #advancedjavascript

    youtube.com/watch?v=yK-u-WHxO0o

  32. Object Keys Get AUTO-SORTED?!

    Object key order is NOT guaranteed! Numeric string keys get SORTED before other keys. You add 'b' first but '1' appears first in Object.keys()! This auto-sorting will DESTROY your expected order!

    #javascript #javascripttricks #object.keys #keyordering #numerickeys #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #objectquirks #advancedjavascript

    youtube.com/watch?v=yK-u-WHxO0o

  33. Labels Let You BREAK NESTED Loops?!

    🔥 SECRET FEATURE! You can break out of nested loops using labels! outer: for... break outer; This skips BOTH loops at once! Senior devs don't even know this. Save this for your next interview!

    #javascript #javascripttricks #codingchallenge #labeledstatements #breakstatement #nestedloops #javascriptquiz #javascriptweird #codinginterview #codingtips #javascriptshorts

    youtube.com/watch?v=XITPsBMsGMw