11.
What will be the output of the following JavaScript code? Code: let x = 15; if (x % 2 === 0) { console.log("Even"); } else { console.log("Odd"); }
12.
What does the following JavaScript code snippet do? Code: let names = ["Alice", "Bob", "Charlie"]; let message = "Names: " + names.join(", "); console.log(message);
13.
What will be the output of the following JavaScript code? Code: let x = 25; if (x % 2 === 0) { console.log("Even"); } else { console.log("Odd"); }
14.
What does the following JavaScript code snippet do? Code: let numbers = [1, 2, 3, 4, 5]; let product = numbers.reduce((total, num) => total * num, 1); console.log(product);
15.
What will be the output of the following JavaScript code? Code: let x = 30; if (x % 2 === 0) { console.log("Even"); } else { console.log("Odd"); }
16.
What does the following JavaScript code snippet do? Code: let numbers = [1, 2, 3, 4, 5]; let max = Math.max(...numbers); console.log(max);
17.
What will be the output of the following JavaScript code? Code: let x = 35; if (x % 2 === 0) { console.log("Even"); } else { console.log("Odd"); }
18.
What does the following JavaScript code snippet do? Code: let numbers = [1, 2, 3, 4, 5]; let avg = numbers.reduce((total, num) => total + num, 0) / numbers.length; console.log(avg);
19.
What will be the output of the following JavaScript code? Code: let x = 40; if (x % 2 === 0) { console.log("Even"); } else { console.log("Odd"); }
20.
What does the following JavaScript code snippet do? Code: let numbers = [1, 2, 3, 4, 5]; let min = Math.min(...numbers); console.log(min);