Загрузка...

JavaScript Lied to You About const 🤯 #codetips #javascript #webdevelopment

Most JavaScript developers believe one thing: const means a value cannot change.
But that belief breaks when you see this:
const user = { name: "Dev" }
user.name = "Devesh"

And JavaScript doesn’t complain.
So what’s really happening?
In this video, I explain:

Why const objects can still change
What const actually locks (hint: it’s the reference, not the value)
The difference between reference vs value
How objects live in memory
Why misunderstanding this causes silent bugs

Key Takeaways
const does NOT make objects immutable — it only locks the reference, not the content.
Think of it like a box:
You can’t replace the box
But you can rearrange or change what’s inside
This subtle JavaScript concept confuses beginners, traps intermediate devs, and even pops up in interviews.

If you’ve ever thought:
“Bhai… const toh change nahi hona chahiye tha?”
This video will clear that confusion once and for all.

Perfect for:
JavaScript beginners, frontend developers, interview prep, and anyone learning JS fundamentals.

#javascript #development #coding #shorts

Видео JavaScript Lied to You About const 🤯 #codetips #javascript #webdevelopment канала 12AM Guy
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять