home.social

#advancedjavascript — Public Fediverse posts

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

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

    youtube.com/watch?v=cAQaqNwFUL0

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

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

  6. Labels Can Break ANY Block?!

    JavaScript has GOTO in disguise! Labels with break can exit ANY block, not just loops! This code jumps OUT of nested blocks instantly. Most developers have NEVER seen this syntax!

    #javascript #javascripttricks #labels #breakstatement #controlflow #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #hiddenfeatures #advancedjavascript

    youtube.com/watch?v=JQ7PX8sFmyo

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

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

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

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

  11. Tagged Template Literals Have RAW Property?!

    Template literals have a SECRET! The raw property shows escape sequences as LITERAL characters. \n becomes TWO characters, not one newline. This hidden feature will blow your mind!

    #javascript #javascripttricks #templateliterals #taggedtemplates #rawproperty #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #stringescaping #advancedjavascript

    youtube.com/watch?v=XDCGZxXAJR0

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

  13. Symbol.species Controls Constructor?!

    Symbol.species is POWERFUL! It controls what constructor methods return. Your custom array methods return plain Array, not your subclass! This breaks inheritance!

    #javascript #javascripttricks #symbol.species #constructorcontrol #subclassing #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #classinheritance #advancedjavascript

    youtube.com/watch?v=3eq3XAas_pc

  14. Proxy Returns Itself Infinitely?!

    This Proxy BREAKS reality! Every property access returns ANOTHER Proxy. You can access infinite nested properties and they ALL work. This is INSANE behavior that defies logic!

    #javascript #javascripttricks #proxy #recursivetrap #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #infiniteproxy #javascriptbugs #advancedjavascript

    youtube.com/watch?v=xNkF6qbklc8

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

    youtube.com/watch?v=uZC26Lm1awY

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

  17. Modifying Array.prototype Affects ALL Arrays?!

    Array.prototype is GLOBAL! Adding methods affects EVERY array in your code. This global pollution will break other code. This is why you never modify prototypes!

    #javascript #javascripttricks #array.prototype #prototypepollution #globalmodification #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #prototypechain #advancedjavascript

    youtube.com/watch?v=DRyZtMDoHDU

  18. Getter That MODIFIES Itself When Called?!

    This getter is ALIVE! Every time you access it, it CHANGES its own behavior. First call returns one value, second call returns something completely different. This self-modifying code will break your logic!

    #javascript #javascripttricks #getters #object.defineproperty #selfmodifyingcode #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #propertydescriptors #advancedjavascript

    youtube.com/watch?v=JPf0Ue1UDkc

Share on Mastodon

Enter the server where you have an account.