jQuery noop() methodThe noop() function is an empty function in jQuery. It does not accept any parameter. We can use this function when we have to pass around a function that does nothing. This method returns undefined. Instead of declaring multiple anonymous functions, we can use the noop() function as a single empty function. SyntaxThe commonly used syntax of using the noop() function is given below - It does not accept any arguments. Now, let's see an example of using the noop() method. ExampleIt is a simple example of using the noop() method. Here, we are storing the value returned by the noop() method in a variable and print that variable using the innerHTML. Test it NowOutput After the execution of the above code, the output will be -
Next TopicjQuery makeArray() method
|