This is a simple easy to understand tutorial on JS functions. I caught myself wondering how an array of objects with firstName and lastName arguments can be updated automatically. It is a natural building step. Thank you for putting this video and so many others out there for others to grow from.
Thank you Mosh! Very simple and straight forward. I am currently a Junior Web Developer and working through a boot camp for Full Stack. This was short but helpful and to the point, excellent material.
I would also like to share that you can add a default parameter. For example : function greet ( name= 'Valued Customer').... so that when you don't add any value to the argument, it comes out as: Hello Valued Customer . I hope that helps! P.S Whatever argument you would add later would override the default parameter.
You've just cleared up exactly why someone should use parametres instead of variables - somethign I've been trying to find a clear explaiantion for - for ages!
So let me see if I've got this straight... A parameter - a unique term typed inside the "function( )" parentheses becomes a variable that is only valid when used within that function itself. also @ 3:02 - 'most programmers don't know the difference between a parameter and an argument'. This is very helpful. I've been studying JS for a month or so, and I'm trying desperately to find the "aha" moment of calling functions and how they relate to creating actions at specific moments.
Thank you again for making programming understandable ! I can't count how many times i have spent hours on simple problems and found the answer on this channel
I get it that you want to show people how core JS works, but why not briefly show that and then move on to how we should be writing it today? I just think that modern JS (ES6+) should be taught up front now instead of people having to search for those lessons specifically. Just my opinion. Please keep the great content coming!
subscribed....Thank you for taking the time to explain this without leaving out any basic details. So many times people who understand things explain them to people who don't as if they have the same experience level or knowledge.
question!: but how does the console know that the argument 'John' is a (name). Do you not need to declare anything prior to logging it onto the console??? is the parameter arbitrary? can you replace it with e.g. greet(pizza)??
Hello Mr.Mosh, I have been playing around with the Google Maps JS APIs and I tried what you just showed in the video and I didn't see anything appear in the console. For some background, I have separated the code into three different files, location.html, location.js & location.css. Is it that I should keep all the code in one file or is it something else?