• +91 9723535972
  • info@interviewmaterial.com

NodeJS Interview Questions and Answers

Question - How does the URL module work?

Answer -

This module helps URL to parse it into host, pathname, search, query, etc.

Example:

var url = require('url');
var adr = 'https://mindmajix.com/?s=node+js+training';
var q = url.parse(adr, true);
console.log(q.host); //returns 'mindmajix.com'
console.log(q.search); //returns '?s=node+js+training'

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners