HomeArenaQuiz #9

Quiz #9

77
Created by Coding Artist

Quiz #9

1 / 10

let nums = [8, 3, 4, 6][8, 3, 4, 6];
let vals = nums.filter((item) => item % 2 == 0);
console.log(vals);

2 / 10

let myDetails = {
  firstName: "Mitali",
  lastName: "J",
};
console.log(myDetails["lastName"]);
What will the above code output to the console?

3 / 10

console.log(mul(1, 3));
var mul = (x, y) => {
  return x + y;
};
What will the above code output to the console?

4 / 10

console.log(add(5, 3));
let add = (a, b) => {
  return a + b;
};
What will the above code output to the console?

5 / 10

let nums = [1, 2, 3, 4];
nums.map((num) => num * 2);
console.log(nums);
What will the above code output to the console?

6 / 10

let num = 1.12345;
let val = num.toFixed();
console.log(val);
What will the above code output to the console?

7 / 10

let num = 1.148;
let val = num.toFixed(2);
console.log(val);
What will the above code output to the console?

8 / 10

let nums = [2, 3, 4, 3];
let len = nums.length;
let value =
nums.reduce((res, item) => {
return res + item;
}, 0) / len;
console.log(value);

9 / 10

console.log(add(5, 3));
function add(a, b) {
  return a + b;
}
What will the above code output to the console?

10 / 10

let a;
function myFunction() {
let a = 10;
return a + 2;
}
console.log(a);
What will the above code output to the console?

Your score is

The average score is 44%

0%

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

eighteen − 10 =

Most Popular