MCQs > IT & Programming > Node.js >

Suppose we have the following code in a Node.js f‌ile.

var path = require('path');

var completePath ='lexample/test/f‌irsthtml';

Which of the following lines of code should be added to the above code so that the output 'f‌irst.html' is displayed?

Node.js MCQs

Suppose we have the following code in a Node.js f‌ile.

var path = require("path");

var completePath ='lexample/test/f‌irsthtml';

Which of the following lines of code should be added to the above code so that the output 'f‌irst.html' is displayed?

Answer

Correct Answer:

console.log(path.basename(completePath));

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Node.js Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Node.js Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it