JS ES5, ES6 and Chrome Dev Tools(short)

A sleek and modern illustration of a computer screen displaying JavaScript code, with a developer engaging with Chrome Dev Tools, surrounded by symbols representing coding and technology.

JavaScript Mastery Quiz

Test your knowledge of JavaScript ES5 and ES6 features, as well as your skills in using Chrome Dev Tools. This quiz is designed for developers looking to sharpen their JavaScript abilities and gain confidence in their coding expertise.

Key Features:

  • 11 engaging questions
  • Multiple choice and checkbox formats
  • Instant feedback on your answers
11 Questions3 MinutesCreated by CodingWizard42
Which JavaScript operator does not represent a loop?
For
While
If
For...in
How many times are we going to see an alert message?
 
for(var i=0;i<5;i++){
   alert("ping");
}
4
5
6
Infinite
How many times are we going to see an alert message?
 
for(var i=0;i<=3+4;i++){
   alert("ping");
}
6
7
8
9
3
4
How many times are we going to see an alert message?
 
var i=0;
while(i < 3) {
   alert("ping");
   i++;
}
2
3
4
Infinite
What will be the value of arr?
 
var arr = [1,2,3,4];
for(var i=0;i<3;i++) {
  arr[i]+= arr[i+1];
}
1,2,3,4
3,5,7,9
3,5,7,4
2,4,6,8
Which keyword is NOT used to declare a variable in JS
Var
Let
Const
Val
Which code will return an array of [1,3,5]?
[1,2,3].map((x,i) => {alert(x); return x+i;})
[1,2,3].map((x,i) => {x+x; x+i;})
[1,2,3].map((x,i) => x*i)
[1,2,3].map((x,i) => {x*i+1;})
const obj = {
   prop1:1,
   prop2:{
      arr:[1,2,3]
   },
   arr:[1,2,3]
};
 
We are going to use the object above for the following console output:
console.log(obj.prop1, obj.arr[1], obj.prop2.arr[0]);
 
You need to refactor(re-write) this line of code using ES6 object destructuring.
Which code from the options below is going to show an identical output(Choose as many answers as you want)?
Const {prop1, arr:[a,b], prop2:{arr:[c]}} = obj; console.log(prop1, b, c);
Const {prop1, arr:[a,b], prop2.arr:[c]} = obj; console.log(prop1, b, c);
Const {prop1, arr:[b], prop2:{arr:[c]}} = obj; console.log(prop1, b, c);
Const {prop1, {arr:[a,b]}, prop2:[arr:c]} = obj; console.log(prop1, b, c);
Const {prop1, arr:[a,...rest], prop2:{arr:[...p]}} = obj; console.log(prop1, rest[0], p[0]);
Const {prop1:p, arr:[a],arr:m,prop2:{arr:[c]}} = obj; console.log(p, m[0], c);
const obj = {
  prop1:{
    prop2:1
  },
  func: () => this.prop1.prop2 //Line #1
};
console.log(obj.func().bind(obj)); //Line #2
obj.func = function(){ //Line #3
  return this.prop1.prop2; //Line #4
}
console.log(obj.func.bind(this)()); //Line #5
const obj1 = obj;
obj = obj1; //Line #6
 
Specify ALL lines that will cause an error(only those lines, that throw an exception to the console). Pseudo line numbers are specified in the comment. This is a multiple choice answer
Line #1
Line #2
Line #3
Line #4
Line #5
Line #6
The team lead sent you a huge HTML page. One of it's blocks has a list of artists and a button, that will remove a random artist from the list. 
After inspecting the list in Chrome DevTools, you found out, that the HTML code looks like this:
 
<ul>
<li>
Artist 1
</li>
<li>
Artist 2
</li>
<li>
Artist 3
</li>
</ul>
How would you find, where is the Javascript code that removes an element from the list?
Select UL element and choose "Break on node removal" breakpoint
Select any LI element an choose "Break on node removal" breakpoint
Select UL element and choose "Break on subtree modifications" breakpoint
Select any LI element and choose "Break on attribute modifications" breakpoint
Select any LI element and choose "Break on subtree modifications" breakpoint
{"name":"JS ES5, ES6 and Chrome Dev Tools(short)", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of JavaScript ES5 and ES6 features, as well as your skills in using Chrome Dev Tools. This quiz is designed for developers looking to sharpen their JavaScript abilities and gain confidence in their coding expertise.Key Features:11 engaging questionsMultiple choice and checkbox formatsInstant feedback on your answers","img":"https:/images/course8.png"}
Powered by: Quiz Maker