What will be the output of the following code snippet?
const obj1 = {first: 20, second: 30, first: 50}; console.log(obj1);
CSS Unit 1
Quiz
•
Other
•
Professional Development
•
Hard
Jyotsna J
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
const obj1 = {first: 20, second: 30, first: 50}; console.log(obj1);
{first: 20, second: 30}
{first: 20}
{first: 20, second: 30, first: 50}
Syntax Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
print(typeof(NaN));
Object
Number
String
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var a = true + true + true * 3; print(a)
3
0
Error
5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
a = [1, 2, 3, 4, 5]; print(a.slice(2, 4));
3,4
2,3
3,4,5
2,3,4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
var a = 1; var b = 0; while (a <= 3) { a++; b += a * 2; print(b); }
4 10 18
1 2 3
1 4 7
None of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which type of JavaScript language is ___
Object-Oriented
Object-Based
Assembly-language
High-level
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following JavaScript code?
functioncomparison()
{
int number=10;
if(number==="10")
return true;
else
return false;
}
true
false
error
none of the above
18 questions
HTML, CSS, and JS Basics
Quiz
•
Professional Development
17 questions
HTML QUIZ
Quiz
•
5th Grade - Professio...
15 questions
KUIS TENTANG PERUNDUNGAN
Quiz
•
Professional Development
21 questions
Level Gold Review
Quiz
•
Professional Development
15 questions
AI Trivia
Quiz
•
Professional Development
15 questions
GenAI & Copilot Overview
Quiz
•
Professional Development
20 questions
PLC
Quiz
•
Professional Development
20 questions
Angular
Quiz
•
Professional Development
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade