JavaScript Functions
JavaScript Functions - Important Points
36. | Which of the following is a higher-order function in JavaScript? |
---|
A. parseInt()
B. setTimeout()
C. Math.abs()
D. Object.keys()
View Answer Discuss Work SpaceAnswer: option b
Explanation:
37. | What is the output of the following code snippet? var x = 2; |
---|
A. 2, 3
B. 3, 2
C. 2, 2
D. 3, 3
View Answer Discuss Work SpaceAnswer: option b
Explanation:
38. | What is the output of the following code snippet? function myFunction(x) { |
---|
A. 2
B. 3
C. undefined
D. Error
View Answer Discuss Work SpaceAnswer: option a
Explanation:
39. | Which of the following is not a JavaScript function declaration method? |
---|
A. Function constructor
B. Function expression
C. Function literal
D. Function prototype
View Answer Discuss Work SpaceAnswer: option d
Explanation: