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);
}
Answer: C
Latest JavaScript Developer I Dumps Valid Version with 144 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund