home.social

#advancedjavascript — Public Fediverse posts

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

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

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

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

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

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

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

  7. new Function() Ignores Local Scope?!

    Function constructor is DANGEROUS! It always runs in GLOBAL scope, ignoring any variables in the enclosing function. Your local 'x' becomes invisible. This scoping behavior will cause HIDDEN bugs!

    #javascript #javascripttricks #functionconstructor #globalscope #variablescope #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #scopequirks #advancedjavascript

    youtube.com/watch?v=LKJ_9YKFSKY

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

    youtube.com/watch?v=vPABx2rdJ54

  9. Array Holes Are NOT undefined?!

    MIND BLOWN! An empty slot in an array is NOT the same as undefined. The hole doesn't exist as a property! map() SKIPS holes but processes undefined. This invisible difference will break your code!

    #javascript #javascripttricks #arrayholes #sparsearrays #undefined #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #arraymethods #advancedjavascript

    youtube.com/watch?v=gJiOuy3o34U

  10. Array.fill() Shares Same Reference?!

    This is a TRAP! Array.fill() with an object puts the SAME object in every slot. Change one, change ALL! Every element points to the same memory location. This silent mutation will destroy your data!

    #javascript #javascripttricks #array.fill #objectreference #mutationbugs #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #referencetypes #advancedjavascript

    youtube.com/watch?v=MaOk-qGi9xw

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

    youtube.com/watch?v=Cff1Vtm5QWY

  12. RegExp lastIndex Mutates Global Matches?!

    Global regex has MEMORY! The lastIndex property remembers where it stopped. Reset it to 0 and the same regex matches DIFFERENTLY. This mutation behavior will cause bugs you'll never find!

    #javascript #javascripttricks #regexp #lastindex #globalregex #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #regexmutation #advancedjavascript

    youtube.com/watch?v=R9Oos0uu-BQ

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

    youtube.com/watch?v=uruE895F7ao

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

    youtube.com/watch?v=xt35jT3qFcY