
JavaScript Functions Quiz
Authored by Dheepan G
Information Technology (IT)
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a function in JavaScript?
define
func
function
method
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following defines a function expression?
function greet() {}
const greet = function() {};
function = greet() {};
let greet = () => {}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function type is not hoisted in JavaScript?
Function declaration
Function expression
Arrow function
Both B and C
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code print?
console.log(square(4));
const square = n => n * n;
16
Error
undefined
NaN
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Arrow functions were introduced in which version of JavaScript?
ES5
ES6
ES7
ES2019
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for an arrow function that adds two numbers?
(a, b) => a + b
a, b => { return a + b }
a, b -> a + b
=> (a + b)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this function?
Hello
Hello undefined
Hello Guest
Error
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?