JavaScript Function Parameters

Learn the basics of JavaScript Function Parameters. A function in JavaScript can accept one or more parameters. Let’s look at some examples: const doSomething = () => { //do something } const doSomethingElse = (foo) => { //do something } const doSomethingElseAgain = (foo, bar) => { //do something } Starting from ES6/ES2015, functions can have default values for their parameters. Here’s an example: const doSomething = (foo = 1, bar = 'hey') => { //do something } This allows you to call the function without specifying all the parameters:...