1. Which data type is used to store multiple values in a single variable?
2. Which method is used to add a new element to the end of an array?
3. What does the map() method do?
4. What will be the output?
let nums = [1,2,3];
let result = nums.map(n => n * 2);
console.log(result);
5. Which method filters elements based on a condition?
6. What will this code return?
let number = [5, 10, 15];
let result = numbers.filter(n => n > 10);
7. Which method is used to reduce an array to a single value?
8. What will be the output?
let nums = [1, 2, 3];
let sum = nums.reduce((a, b) => a + b, 0);
console.log(sum);
9. How do you access the value of name in this object?
let student = { name: "John", age: 20 };
10. Which format is used to store and exchange data?
