#javascriptshorts

JavaScriptBuzzJavaScriptBuzz
2026-02-04

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!

youtube.com/watch?v=DEtGXfUIjsE

JavaScriptBuzzJavaScriptBuzz
2026-02-02

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!

youtube.com/watch?v=pnuVGVN9Kfk

JavaScriptBuzzJavaScriptBuzz
2026-02-01

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!

.keys

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

JavaScriptBuzzJavaScriptBuzz
2026-01-28

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!

youtube.com/watch?v=XITPsBMsGMw

JavaScriptBuzzJavaScriptBuzz
2026-01-27

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!

youtube.com/watch?v=LKJ_9YKFSKY

JavaScriptBuzzJavaScriptBuzz
2026-01-25

Tagged Template Does MATH in Strings?!

Tagged templates can EXECUTE CODE! The tag function receives values and can transform them. This one DOUBLES every number. String interpolation becomes code execution!

youtube.com/watch?v=9VcxL27MZGQ

JavaScriptBuzzJavaScriptBuzz
2026-01-19

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!

youtube.com/watch?v=vPABx2rdJ54

JavaScriptBuzzJavaScriptBuzz
2026-01-18

Spread Operator Works on STRINGS?!

Spread operator is MAGIC! It works on strings (splits to chars) but NOT on objects. This inconsistency will cause bugs when you least expect it!

youtube.com/watch?v=C5b4x5M_WD8

JavaScriptBuzzJavaScriptBuzz
2026-01-15

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!

youtube.com/watch?v=pd6wpNTvbiM

JavaScriptBuzzJavaScriptBuzz
2026-01-13

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!

youtube.com/watch?v=JQ7PX8sFmyo

JavaScriptBuzzJavaScriptBuzz
2026-01-11

Array Methods Work on NON-Arrays?!

Array methods are DECEPTIVE! They work on any object with length property. This object isn't an array, but map() works on it! JavaScript lies about types!

youtube.com/watch?v=7Kc8hvaE580

JavaScriptBuzzJavaScriptBuzz
2026-01-11

String Primitives Have Methods But No Properties?!

Strings are DECEPTIVE! They have methods (auto-boxing) but you can't assign properties. Properties disappear immediately. This is primitive vs object confusion!

youtube.com/watch?v=8oizJ3htgIA

JavaScriptBuzzJavaScriptBuzz
2026-01-11

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!

youtube.com/watch?v=gJiOuy3o34U

JavaScriptBuzzJavaScriptBuzz
2026-01-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!

.fill

youtube.com/watch?v=MaOk-qGi9xw

JavaScriptBuzzJavaScriptBuzz
2026-01-10

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!

youtube.com/watch?v=dCreOmKWYwM

JavaScriptBuzzJavaScriptBuzz
2026-01-10

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!

youtube.com/watch?v=Cff1Vtm5QWY

JavaScriptBuzzJavaScriptBuzz
2026-01-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!

youtube.com/watch?v=R9Oos0uu-BQ

JavaScriptBuzzJavaScriptBuzz
2026-01-09

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!

youtube.com/watch?v=CWaukFLyq1A

JavaScriptBuzzJavaScriptBuzz
2026-01-08

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!

youtube.com/watch?v=C_bVlNy3FMI

JavaScriptBuzzJavaScriptBuzz
2026-01-06

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!

youtube.com/watch?v=XDCGZxXAJR0

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst