
JS Quiz 2 SECE
Authored by Vengatesh vengatesh
Other
Professional Development

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
const myPromise = () => Promise.resolve('I have resolved!');
function firstFunction() {
myPromise().then(res => console.log(res));
console.log('second');
}
async function secondFunction() {
console.log(await myPromise());
console.log('second');
}
firstFunction();
secondFunction();
const myPromise = () => Promise.resolve('I have resolved!');
function firstFunction() {
myPromise().then(res => console.log(res));
console.log('second');
}
async function secondFunction() {
console.log(await myPromise());
console.log('second');
}
firstFunction();
secondFunction();I have resolved!,secondandI have resolved!,second
second, I have resolved! and second, I have resolved!
I have resolved!, second and second, I have resolved!
second, I have resolved! and I have resolved!, second
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is it's value?
Promise.resolve(5);
What is it's value?
Promise.resolve(5);5
Promise {<pending>: 5}
Promise {<resolved>: 5}
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
const colorConfig = {
red: true,
blue: false,
green: true,
black: true,
yellow: false,
};
const colors = ['pink', 'red', 'blue'];
console.log(colorConfig.colors[1]);
const colorConfig = {
red: true,
blue: false,
green: true,
black: true,
yellow: false,
};
const colors = ['pink', 'red', 'blue'];
console.log(colorConfig.colors[1]);true
false
undefined
TypeError
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let name = 'Lydia';
function getName() {
console.log(name);
let name = 'Sarah';
}
getName();
let name = 'Lydia';
function getName() {
console.log(name);
let name = 'Sarah';
}
getName();Lydia
Sarah
undefined
ReferenceError
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let config = {
alert: setInterval(() => {
console.log('Alert!');
}, 1000),
};
config = null;
let config = {
alert: setInterval(() => {
console.log('Alert!');
}, 1000),
};
config = null;The setInterval callback won't be invoked
The setInterval callback gets invoked once
The setInterval callback will still be called every second
We never invoked config.alert(), config is null
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
const name = 'Lydia Hallie';
console.log(!typeof name === 'object');
console.log(!typeof name === 'string');
const name = 'Lydia Hallie';
console.log(!typeof name === 'object');
console.log(!typeof name === 'string');false true
true false
true true
false false
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var p = new Promise((resolve, reject) => {
return Promise.reject(Error('The Fails!'))
})
p.catch(error => console.log(error.message))
p.catch(error => console.log(error.message))
var p = new Promise((resolve, reject) => {
return Promise.reject(Error('The Fails!'))
})
p.catch(error => console.log(error.message))
p.catch(error => console.log(error.message))print message once
print message twice
UnhandledPromiseRejectionWarning
process exits
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?
Similar Resources on Wayground
10 questions
Supply_PKT-2_September'23
Quiz
•
Professional Development
15 questions
Agency OBX -Day 1 Quiz
Quiz
•
Professional Development
15 questions
REV CODE
Quiz
•
Professional Development
15 questions
QUIZ NSC 26 Juli 2023
Quiz
•
Professional Development
15 questions
Términos de Seguridad de Información
Quiz
•
Professional Development
10 questions
Rakor Komite Audit dan Internal Audit Grup MIND ID S.1 2024
Quiz
•
Professional Development
15 questions
UNIT II
Quiz
•
Professional Development
10 questions
Pre- Test Kursus Pementoran
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Other
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
12 questions
Unit 5: Puerto Rico W1
Quiz
•
Professional Development
42 questions
LOTE_SPN2 5WEEK2 Day 4 We They Actividad 3
Quiz
•
Professional Development
15 questions
Balance Equations Hangers
Quiz
•
Professional Development
31 questions
Servsafe Food Manager Practice Test 2021- Part 1
Quiz
•
9th Grade - Professio...