What will be the output in the browser for the URL: http://localhost:3000/ ?
const http = require('http');
const server = http.createServer((req, res) => {
    res.end("hello world");
    res.end("hello")
})

server.listen(3000);

hello
hello world
hello
hello world
Code with throw error as res.end() can be used only once
Verified Answer
Correct Option - c

To get all Infosys Certified Node Developer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram