
JavaScript Day 2

Quiz
•
Other
•
University
•
Hard
Abdul Roshan
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following is a correct way to declare a variable in JavaScript?
variable name = 'John';
let name = 'John';
const name = 'John';
var name 'John';
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a primitive data type in JavaScript?
Number
String
Object
Boolean
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following expression: '5' + 3?
8
53
35
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
var x = 10;
if (true) {
var x = 20;
}
console.log(x);
10
20
Undefined
Null
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
let y = 10;
if (true) {
let y = 20;
}
console.log(y);
10
20
Error
Undefined
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to convert all the lowercase letters in a string to uppercase in JavaScript?
toLowerCase()
toUpperCase()
capitalize()
uppercase()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following declarations will result in an error if the variable is reassigned or redeclared?
var name = 'John';
let name = 'John';
const name = 'John';
var name;
name = 'John';
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Diagnóstico Tópicos Avanzados de Programación.

Quiz
•
University
10 questions
WEB Dasar

Quiz
•
1st Grade - University
10 questions
GDSC Cruise Event Round 2

Quiz
•
University
10 questions
Javascript тілі

Quiz
•
University
10 questions
Understanding Arrays in Programming

Quiz
•
University
12 questions
Database NoSQL (MongoDB)

Quiz
•
University - Professi...
10 questions
Frontend Quiz 5 summer internship

Quiz
•
University
15 questions
R programming

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade