1.
What is the main purpose of the () operator in JavaScript functions?
2.
How do you invoke a function named myFunction?
3.
What is the output of function test() { return 2 + 2; } console.log(test());?
4.
Which of the following is an example of an Immediately Invoked Function Expression (IIFE)?
5.
How can you invoke a function using the call method?
6.
What is the result of invoking a function without parentheses, like myFunction?
7.
What is the output of function sum(a, b) { return a + b; } console.log(sum(3, 4));?
8.
How do you invoke a method named greet on an object person?
9.
What does return do inside a function?
10.
What happens if a function is invoked without parentheses in an event handler like onclick="myFunction"?