Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

JavaScript-Developer-I Practice Test


Page 15 out of 45 Pages

Given the following code:
Let x =null;
console.log(typeof x);
What is the output of the line 02?


A.

“Null”


B.

“X”


C.

“Object”


D.

“undefined”





C.
  

“Object”



A developer wants to use a try...catch statement to catch any error that countSheep () may
throw and pass it to a handleError () function.
What is the correct implementation of the try...catch?



A.

Option


B.

Option


C.

Option


D.

Option





A.
  

Option



A team that works on a big project uses npm to deal with projects dependencies.
A developer added a dependency does not get downloaded when they execute npm
install.
Which two reasons could be possible explanations for this?
Choose 2 answers


A.

The developer missed the option --add when adding the dependency.


B.

The developer added the dependency as a dev dependency, and
NODE_ENV Is set to production.


C.

The developer missed the option --save when adding the dependency.


D.

The developer added the dependency as a dev dependency, and
NODE_ENV is set to production.





B.
  

The developer added the dependency as a dev dependency, and
NODE_ENV Is set to production.



C.
  

The developer missed the option --save when adding the dependency.



D.
  

The developer added the dependency as a dev dependency, and
NODE_ENV is set to production.



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.”?


A.

document.querySelectorAll(‘$main $TONY’).innerHTML = ’ Mr. T. ’;


B.

document.querySelector(‘$main li:second-child’).innerHTML = ’ Mr. T. ’;


C.

document.querySelector(‘$main li.Tony’).innerHTML = ’ Mr. T. ’;


D.

document.querySelector(‘$main li:nth-child(2)’),innerHTML = ’ Mr. T. ’;





D.
  

document.querySelector(‘$main li:nth-child(2)’),innerHTML = ’ Mr. T. ’;



Refer to the code below:
Const searchTest = ‘Yay! Salesforce is amazing!” ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?


A.

> true > false B. > 5 >undefined


B.

> 5 > -1


C.

> 5 > 0





B.
  

> 5 > -1




Page 15 out of 45 Pages
Previous