Note 6 : Functions

It is a fundamental building block of JavaScript. it is basically a set of statements to perform some tasks and calculate the value. while declaring any function we don't need to add semicolumn at the end like we have declared any variables before. but the functions are more than rather only declaring and calling we can make this more interesting by passing arguments and call that function. Here one thing we have to notice that when we pass in anything in the function call is known as an argument. like here in the above example printMessage('This is the message') the sting here in 'This is the message' is an argument. and a message is written in the function printMessage(message) is a parameter here in printMessage function. the main fundamental things here to work like this is we can reuse the printMessage function. a function may have multiple parameters. the default value of the parameter is undefined. Types of function : or we can write this like this. the funct...