List of questions
Related questions
Question 88 - Certified JavaScript Developer I discussion
developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality.
The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
Given the code and the information the developer has, which code logs an error at boost with an event?
A.
Server.catch ((server) => {console.log('ERROR', error);});
B.
Server.error ((server) => {console.log('ERROR', error);});
C.
Server.on ('error', (error) => {console.log('ERROR', error);});
D.
Try{server.start();} catch(error) {console.log('ERROR', error);}
Your answer:
0 comments
Sorted by
Leave a comment first