logo

Crowdly

Browser

Add to Chrome

WEB202_Web Development 2_24/25_T2_11.CCP

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!

Context:

Using .filter method.

Given:

const nums = [1,2,3,4,5];

const evens = nums.filter(n => n % 2 === 0);

What does evens contain?

]]>
View this question
Context:

Understanding the DOM tree structure.

Given this HTML:

<div id="parent">

<div class="child"></div>

<div class="child"></div>

</div>

Which statement is correct?

]]>
0%
0%
0%
0%
View this question
Context:

Using map to transform an array.

What is the result of this code?

const nums = [1, 2, 3];

const doubled = nums.map(n => n * 2);

console.log(doubled);

]]>
0%
0%
0%
0%
View this question
Context:

Understanding reference behavior with objects.

What will be the output of the following code?

let animal = {type: 'dog'};

let pet = animal;

animal.type = 'cat';

console.log(pet.type);

]]>
View this question
What’s the issue with the following comment? 

// Add name to greeting

const greeting = "Hello " + name;

View this question
Context:

Array mutation with filter.

Given:

const arr = [5,10,15];

arr.filter(x => x>3);

What happens to arr?

]]>
View this question

Context:

const arr = [1, 2, 3, 4, 5];

const odds = arr.filter(num => num % 2 !== 0);

console.log(odds);

What will odds contain?

0%
0%
0%
0%
View this question
Context:

Repeating a string.

What does this print?

const str = "ha";

console.log(str.repeat(3));

]]>
0%
0%
0%
0%
View this question
What is camelCase?

0%
0%
0%
0%
View this question
Which of the following function names is most appropriate?

View this question

Want instant access to all verified answers on moodle.ncst.edu.bh?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome