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 4 out of 45 Pages

Given the following code:
Let x =(‘15’ + 10)*2;
What is the value of a?


A.

3020


B.

1520


C.

50


D.

35





A.
  

3020



A developer creates an object where its properties should be immutable and prevent
properties from being added or modified.
Which method should be used to execute this business requirement ?


A.

Object.const()


B.

Object.eval()


C.

Object.lock()


D.

Object.freeze()





D.
  

Object.freeze()



Given the following code:
document.body.addEventListener(‘ click ’, (event) => {
if (/* CODE REPLACEMENT HERE */) {
console.log(‘button clicked!’);
)
});
Which replacement for the conditional statement on line 02 allows a developer to
correctly determine that a button on page is clicked?


A.

Event.clicked


B.

e.nodeTarget ==this


C.

event.target.nodeName == ‘BUTTON’


D.

button.addEventListener(‘click’)





C.
  

event.target.nodeName == ‘BUTTON’



Refer to the expression below:

Let x = (‘1’ + 2) == (6 * 2);
How should this expression be modified to ensure that evaluates to false?


A.

Let x = (‘1’ + ‘ 2’) == ( 6 * 2);


B.

Let x = (‘1’ + 2) == ( 6 * 2);


C.

Let x = (1 + 2) == ( ‘6’ / 2);


D.

Let x = (1 + 2 ) == ( 6 / 2);





B.
  

Let x = (‘1’ + 2) == ( 6 * 2);



A developer wants to set up a secure web server with Node.js. The developer creates a
directory locally called app-server, and the first file is app-server/index.js
Without using any third-party libraries, what should the developer add to index.js to create
the
secure web server?


A.

const https =require(‘https’);


B.

const server =require(‘secure-server’);


C.

const tls = require(‘tls’);


D.

const http =require(‘http’);





A.
  

const https =require(‘https’);




Page 4 out of 45 Pages
Previous