logo

Crowdly

Browser

Додати до Chrome

WEB202_Web Development 2_24/25_T2_11.CCP

Шукаєте відповіді та рішення тестів для WEB202_Web Development 2_24/25_T2_11.CCP? Перегляньте нашу велику колекцію перевірених відповідей для WEB202_Web Development 2_24/25_T2_11.CCP в moodle.ncst.edu.bh.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

How can you modify this function to correctly capitalize only the first letter of a string?

function capitalize(str) {

return str.toUpperCase();

}

0%
0%
0%
0%
Переглянути це питання
Context:

Using .reduce on an array.

Given:

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

const sum = arr.reduce((a,b) => a+b, 0);

What is the value of sum?

]]>
0%
0%
0%
0%
Переглянути це питання

Context:

Merging two branches together.

Переглянути це питання
Context:

DOM manipulation and object reference.

What happens after executing this code?

const div = document.createElement('div');

const copy = div;

div.style.backgroundColor = 'red';

console.log(copy.style.backgroundColor);

]]>
0%
0%
0%
0%
Переглянути це питання
Context:

Difference between primitive and object assignment.

Given:

let x = 10;

let y = x;

y = 20;

What is the value of x?

]]>
0%
0%
0%
0%
Переглянути це питання
Context:

Accessing string characters using bracket notation.

What does this print?

const str = "World";

console.log(str[0]);

]]>
Переглянути це питання
What should getHumanChoice() return?

Reference Code:

function getHumanChoice() {

  const choice = prompt("Enter rock, paper, or scissors:");

  return choice.trim().toLowerCase();

}

0%
0%
0%
0%
Переглянути це питання
What are the two main components of an error message in JavaScript?

0%
0%
0%
0%
Переглянути це питання
Context:

Changing style on click.

What happens after clicking a button with this code?

btn.addEventListener('click', function(e) {

e.target.style.background = 'blue';

});

]]>
Переглянути це питання
Why is breaking a big problem into smaller subproblems beneficial?

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.ncst.edu.bh?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome