ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 15 - Certified JavaScript Developer I discussion

Report
Export

Refer to the code below:

01 const server = require('server');

02 /* Insert code here */

A developer imports a library that creates a web server. The imported library uses events and callbacks to start the servers Which code should be inserted at the line 03 to set up an event and start the web server ?

A.
Server.start ();
Answers
A.
Server.start ();
B.
server.on(' connect ' , ( port) => { console.log('Listening on ' , port) ;})
Answers
B.
server.on(' connect ' , ( port) => { console.log('Listening on ' , port) ;})
C.
server()
Answers
C.
server()
D.
serve(( port) => (
Answers
D.
serve(( port) => (
E.
console.log( 'Listening on ', port) ;
Answers
E.
console.log( 'Listening on ', port) ;
Suggested answer: B
asked 23/09/2024
adnan ayyash
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first