HomeArenaQuiz #7

Quiz #7

93
Created by Coding Artist

Quiz #7

1 / 10

let nums = [78, 43, 3, 23, 5];
nums.sort();
nums.reverse();
console.log(nums);
What will the above code output to the console?

2 / 10

let months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",];
let myDate = new Date();
myDate.setMonth(12);
console.log(months[myDate.getMonth(1)]);

3 / 10

let num = Math.floor(Math.random() * 10);
console.log(num);
What will the above code output to the console?

4 / 10

let nums1 = [10, 20, 30];
let nums2 = [...nums1];
nums1[1] = 40;
console.log(nums2);
What will the above code output to the console

5 / 10

let a = 15;
let greeting = a % 2 == 0 ? "hello" : a % 4 == 0 ? "hi" : "bye";
console.log(greeting);
What will the above code output to the console?

6 / 10

let myFunc = (x, y = 10) => {
  return x + y;
};
console.log(myFunc(5, true));
What will the above code output to the console?

7 / 10

a = 5;
var a;
console.log(a);
What will the above code output to the console?

8 / 10

let months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",];
let myDate = new Date();
myDate.setMonth(6);
console.log(months[myDate.getMonth()]);

9 / 10

let str = " I enjoy coding! ";
console.log(str.trim());
What will the above code output to the console?

10 / 10

let a = "1" + 1;
let b = "1" - 1;
console.log(a + b);
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

15 + fifteen =

Most Popular