Difference between VAR, CONST, LET | Javascript Variables Explain in 1 min

preview_player
Показать описание
Want to know differences between VAR, CONST, LET in javascript? In this video, you will find out in 1 min summary of the differences in var, let, or const.
.
Because there are three. Var let and const. and here is how I remembered the differences.
-
🔹Think of const like giving a gender to a newborn baby 😂😂😂 yep you can’t change that. It’s pretty set and done.
-
Var and let are a little bit trickier. Hear me out 😅😂😂😂😂😂😂😂
-
🔹Var is your name. Like everyone knows once it’s given. No matter where you go! - globally declared. (If you’re not sure what’s the difference between global variables and local. I’ve got a video on that too! I also have a YouTube channel that stores all my videos. 😛FYI in my bio)
-
🔹Let is a name too but it’s your nickname which means only your family knows it. Or some of your closest friends. None one else. 😛😛😛just like Vicky. Lol jk.
That means let will not be accessible everywhere (local variable)
.
.
Hope that helps! It’s very confusing concept so if you have a better way to remember it please share! 😍😍😍🤙🏽🤙🏽

Music Credits:
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

#vickysdailystandup #javascript #variables
Рекомендации по теме
Комментарии
Автор

Excellent metaphors. So...I'm chaos(LET)but my real name is Jairo (VAR)yes? And CONST is a bit harder for showing an example...I'm a boy(CONST) ? lol let me know if this idea follows up exact or perhaps close enough

Skelen