Free CRT-600 Exam Braindumps (page: 30)

Page 29 of 57

Refer to following code block:
Let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,];
Let output =0;
For (let num of array){
if (output >0){
Break;
}
if(num % 2 == 0){
Continue;
}
Output +=num;
What is the value of output after the code executes?

  1. 16
  2. 36
  3. 11
  4. 25

Answer(s): A



Refer to the code below:
<html lang="en">
<table onclick="console.log(Table log');">
<tr id="row1">
<td>Click me!</td>
</tr>
<table>
<script>
function printMessage(event) {

console.log(`Row log');
}
Let elem = document.getElementById(`row1');
elem.addEventListener(`click', printMessage, false);
</script>
</html>
Which code change should be made for the console to log only Row log when `Click me! ' is clicked?

  1. Add.event.stopPropagation(); to window.onLoad event handler.
  2. Add event.stopPropagation(); to printMessage function.
  3. Add event.removeEventListener(); to window.onLoad event handler.
  4. Add event.removeEventListener(); toprintMessage function.

Answer(s): B



Refer to code below:
Let a ='a';
Let b;
// b = a;
console.log(b);
What is displayed when the code executes?

  1. ReferenceError: b is not defined
  2. A
  3. Undefined
  4. Null

Answer(s): C



Refer to the code below:
let timeFunction =() => {
console.log(`Timer called.");
};
let timerId = setTimeout (timedFunction, 1000);
Which statement allows a developer to cancel the scheduled timed function?

  1. removeTimeout(timedFunction);
  2. removeTimeout(timerId);
  3. clearTimeout(timerId);
  4. clearTimeout(timedFunction);

Answer(s): C






Post your Comments and Discuss Salesforce CRT-600 exam with other Community members:

CRT-600 Discussions & Posts