Day 15: Advanced Functions & Scope
Intermediate Function Usage
Scope refers to which variables are accessible in specific functions. Every variable has a scope that it can be used inside, outside of that scope we cannot use that variable. Variables that are declared inside of functions are local to that specific function. Variables declared outside of a function have global scope and can be accessed from anywhere. We should use const and let to declare our variables instead of var as they are block-scoped instead of function-scoped. Block scoped elements are local to functions, as well as loops and if-else statements.
Finally back at it! Sorry for the long break between articles, I have been caught up in the holidays! Boot camp is back and I will be returning to my posts with all the content I have learned. I also secured my first job as a Front End Web Developer, so I am super excited to build something awesome for the client! ✌🏼