A function in Javascript is like a procedure or a set of statements that preform a task or calculate a value. For a procedure to qualify as a function, it must take an input and return an output and there should be an obvious relationship between the input and the output. The JS call() method is used to apply the same function to more than one object. It is used to make a method or function that is already assigned to a specific object be invoked for another object as well. We can also use If/Else statements to execute a block of code if a specified condition is true. If the condition is false, then an alternative block of code is executed. The isNaN() function is used to determine wether a given value is an illegal number. It returns true of the given value is a NaN, otherwise it returns false.
Leave a Reply
You must be logged in to post a comment.