Exercise
Once again, this exercise will take place in the developer console and will test your knowledge of the above concepts. These concepts form the core of JavaScript and it’s extremely important you have a firm grasp on how they work. If you are unable to complete this exercise with the expected output, please revisit the above content and attempt it again. It’s important that you don’t try to progress further without understanding these basic operators:
Functions are the building blocks of a piece of JavaScript code. They are reusable snippets of code that perform an action (or task). Functions are run (executed) when something ‘invokes’ or ‘calls’ it. This might sound complicated, but once you see a few examples it will all become clearer. Let’s kick off with a nice and easy function for us to analyse: