filmov
tv
Functional-scope vs Block-scope #javascript #web #viral #shorts #frontend #learning
Показать описание
Functional-scope vs Block-scope
What is scope ?
Scope stands for where our variable will be available to use inside our code and where it will not.
what is Function scope ?
Variable having Function-scope means variable will only be available to use inside the function it declared, will not be accessible outside of function, and will give Reference Error if we try to access.
What is Block-scope ?
Block means a pair of curly brackets, a block can be anything that contains an opening and closing curly bracket.
Variable having Block-scope will only be available to use inside the block it declared, will not be accessible outside the block, and will give Reference Error if we try to access.
Thanks for watching!
Don't forget to like ,comment and subscribe my youtube channel.
👇
@theByteBlend
What is scope ?
Scope stands for where our variable will be available to use inside our code and where it will not.
what is Function scope ?
Variable having Function-scope means variable will only be available to use inside the function it declared, will not be accessible outside of function, and will give Reference Error if we try to access.
What is Block-scope ?
Block means a pair of curly brackets, a block can be anything that contains an opening and closing curly bracket.
Variable having Block-scope will only be available to use inside the block it declared, will not be accessible outside the block, and will give Reference Error if we try to access.
Thanks for watching!
Don't forget to like ,comment and subscribe my youtube channel.
👇
@theByteBlend