JavaScript Functions In 90 Seconds #JavaScriptJanuary
Watch the entire #JavaScriptJanuary series from the beginning!
A JavaScript function is a block of code designed to perform a specific task and to be reusable. A standard, named function is defined with the function keyword, then a name, then parentheses.
The function name can contain letters, numbers, underscores, and dollar signs. The parentheses may include parameter names separated by commas. The code to be executed is placed inside curly braces.
You may hear the terms parameters and arguments used somewhat interchangeably. Arguments are the values received by the function when it is invoked, or called. The parameters, or arguments, are then used within the code block as variables.
Another thing to consider when writing functions is that variables declared within a function become local to the function and cannot be accessed outside of the function.
But functions do have access to variables on the outside. This is called scope. Outside of the function would be globally scoped and inside of the function is locally scoped.
I’ll be releasing a new video every day in January! Stay tuned..
_____________________________________
📚 Learn to CODE in just a FEW months here:
Treehouse Discount Code: https://treehouse.7eer.net/codeSTACKr
_____________________________________
🛠️ Tools I use:
🟠 Theme: https://marketplace.visualstudio.com/items?itemName=codestackr.codestackr-theme
🟠 Font: STACKr Code (Exclusive to my VS Code Course – https://vsCodeHero.com)
🟠 SuperHero Extension Pack: https://marketplace.visualstudio.com/items?itemName=codeSTACKr.superhero-extensions
🚢 Deploy for FREE on Vercel: https://vercel.com/ambassadors/codestackr
_____________________________________
💖 Show support!
PayPal: https://paypal.me/codeSTACKr
_____________________________________
Watch Next:
Web Development – Beginners Roadmap (2020) – https://youtu.be/iogabydg2y0
Playlist: Web Development For Beginners – https://www.youtube.com/watch?v=Ez4yHS2dsN8&list=PLkwxH9e_vrAJ0WbEsFA9W3I1W-g_BTsbt
_____________________________________
Connect With Me:
Website: http://www.codestackr.com
Twitter: https://twitter.com/codeSTACKr
Instagram: https://instagram.com/codeSTACKr/
Facebook: https://facebook.com/codeSTACKr
_____________________________________
** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
#JavaScriptJanuary #31Days31Videos #codeSTACKr
source