Which code should be inserted at the line 03 to set up an event and start the web server?
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 ();
B . server.on(‘ connect ’, (port) => {console.log(‘Listening on ’, port) ;})
C . server()
D . serve(( port) => (
E . console.log( ‘Listening on ’, port) ;
Answer: B
Latest JavaScript Developer I Dumps Valid Version with 144 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments