Looking for WEB202_Web Development 2_24/25_T2_11.CCP test answers and solutions? Browse our comprehensive collection of verified answers for WEB202_Web Development 2_24/25_T2_11.CCP at moodle.ncst.edu.bh.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What happens after clicking a button with this code?
btn.addEventListener('click', function(e) {
e.target.style.background = 'blue';
});
]]>Given:
const arr = [1,2,3,4];const result = arr.filter(x => x % 2 === 0).map(x => x * 10);What is result?]]>
What will the console output?
function change(obj) { obj.value = 10; }
const obj = {value: 5};
change(obj);
console.log(obj.value);
]]>function x() {
return "Hello";
}Given:
const a = { value: 10 };const b = a;b.value = 20;What is the value of a.value now?]]>
Result of this code?
const nums = [1,2,3,4,5,6];
const even = nums.filter(x => x % 2 === 0);
console.log(even);
]]>Context:
const profile = { name: "Sara", age: 30 };
const copy = profile;
Which of the following modifies both profile and copy?