Free Certified JavaScript Developer I Exam Braindumps
Salesforce Certified JavaScript Developer I Questions 76–80 (page: 17)

Updated On: 10-Feb-2026

developer removes the HTML class attribute from the checkout button, so now it is simply:
<button>Checkout</button>.
There is a test to verify the existence of the checkout button, however it looks fora button with class= "blue". The test fails because no such button is found.
Which type of test category describes this test?

  1. True positive
  2. True negative
  3. False positive
  4. False negative

Answer(s): D



Which two code snippets showworking examples of a recursive function? Choose 2 answers

  1. Let countingDown = function(startNumber) {If ( startNumber >0) {console.log(startNumber) ;return countingDown(startNUmber);} else {return startNumber;}};
  2. Function factorial ( numVar ) {If (numVar < 0) return;If ( numVar === 0 ) return 1;return numVar -1;
  3. Const sumToTen = numVar => {If (numVar < 0)Return;return sumToTen(numVar + 1)};
  4. Const factorial =numVar => {If (numVar < 0) return;If ( numVar === 0 ) return 1;returnnumVar *
    factorial ( numVar - 1 );};

Answer(s): A,D



Refer to the HTML below:
<div id="main">
<ul>
<li>Leo</li>
<li>Tony</li>
<li>Tiger</li>
</ul>
</div>
Which JavaScript statement results in changing " Tony" to "Mr. T."?

  1. document.querySelectorAll(`$main $TONY').innerHTML = ' Mr. T. ';
  2. document.querySelector(`$main li:second-child').innerHTML = ' Mr. T. ';
  3. document.querySelector(`$main li.Tony').innerHTML = ' Mr. T. ';
  4. document.querySelector(`$main li:nth-child(2)'),innerHTML =' Mr. T. ';

Answer(s): D



Considering type coercion, what does the following expression evaluate to? True + `13' + NaN

  1. ` 113Nan '
  2. 14
  3. ` true13 '
  4. ` true13NaN '

Answer(s): D



A developer wrote a fizzbuzz function thatwhen passed in a number, returns the following:
`Fizz' if the number is divisible by 3.
`Buzz' if the number is divisible by 5.
`Fizzbuzz' if the number is divisible by both 3 and 5. Empty string if the number is divisible by neither 3 or 5.

Whichtwo test cases will properly test scenarios for the fizzbuzz function? Choose 2 answers

  1. let res = fizzbuzz(5);console.assert ( res === ` ' );
  2. let res = fizzbuzz(15);console.assert ( res === ` fizzbuzz ' )
  3. let res = fizzbuzz(Infinity);console.assert ( res === ` ' )
  4. let res = fizzbuzz(3);console.assert ( res === ` buzz ' )

Answer(s): B,C,D



Viewing page 17 of 46
Viewing questions 81 - 85 out of 224 questions


Post your Comments and Discuss Salesforce Certified JavaScript Developer I exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!