JavaScript Logic Problem Solved in 60 Seconds!
HTML-код
- Опубликовано: 4 фев 2025
- Struggling with JavaScript logic? Watch as I break down and solve a common JavaScript logic problem in under a minute! This is a great way to boost your coding skills and tackle tricky coding challenges with ease. Don't forget to like and subscribe for more quick coding tips!"
#JavaScript #CodingTips #Programming
Whoever is watching the video
Please read the comment i made a mistake while speaking so when you declare a variable with var keyword it's scope is function scope and you can get access to it anywhere inside the function and with let and const keyword it scope is block scope it means the variable inside the function is different from the variable inside the if statement
Sorry for making a mistake😢
deep concept
Thank you , read the comment there is a mistake in video while speaking so
when you declare a variable with var keyword inside the function it scope is function scope it means you can access this variable anywhere in the function that is why it overwrites the value of x and the answer is 20
When you declare a variable with let and const keyword inside the function it scope is block scope and you can't access the variable in the block scope like if , for etc so the variable you declare outside of the block is different and it would not affect the variable inside the function so the answer remains the same 10
bro it is 2024, soon it will be 2025. purchase one calendar.
OK