How can the code be modified to handle both successful and failed promises?
Difficulty: Impossible😈
Difficulty: Impossible😈
const promises = [
Promise.resolve(1),
Promise.reject(new Error('Error'))
];
Promise.all(promises)
.then(results => console.log(results))
.catch(error => console.error(error));
👍1🤯1
Which property controls the stacking order of elements?
Anonymous Quiz
5%
visibility
77%
z-index
5%
opacity
13%
display
Which method adds a new child node to a parent node?
Anonymous Quiz
27%
addChild()
17%
insertNode()
8%
createChild()
48%
appendChild()
Find the error in the code.
Difficulty: Easy😁
Difficulty: Easy😁
function add(a, b) {
return a + b;
}
const result = add(5);
console.log(result);What does the target="_blank" attribute in the <a> tag do?
Anonymous Quiz
79%
Opens the link in a new tab
16%
Opens the link in the same tab
2%
Refreshes the page
3%
Links to an email
Which property is used to create space inside an element between its content and its border?
Anonymous Quiz
18%
margin
12%
border
66%
padding
4%
width
👏3👍2🔥1
What will this code output? Spot the bug.
Difficulty: Hard😤
Difficulty: Hard😤
for (var i = 0; i < 5; i++) {
setTimeout(function() {
console.log(i);
}, 1000);
}Which of the following creates a true copy of the object obj in JavaScript?
Anonymous Quiz
24%
let newObj = [...obj];
39%
let newObj = Object.assign({}, obj);
20%
let newObj = obj;
18%
let newObj = obj.clone();
Choose the correct HTML element to define important text
Anonymous Quiz
18%
<important>
15%
<b>
14%
<i>
53%
<strong>
Spread Operator in Depth
Ecmascript 2015 or ES6 is the sixth major edition of Ecmascript language specification standard. It bought significant changes to Javascript language.
Ecmascript 2015 or ES6 is the sixth major edition of Ecmascript language specification standard. It bought significant changes to Javascript language.
👍2🔥1