Skip to main content

Posts

Featured

Node.js interview questions set 2

  Let start with set 2, 5)What is buffer in node.js? Ans:  Node.js includes an additional data type called Buffer (not available in browser's JavaScript).  Buffer is mainly used to store binary data while reading from a file or receiving packets over the network. Buffer class is a global class that can be accessed in an application without importing the buffer module. Ex:var buf = new Buffer(10); 6)Explain the concept of URL module in Node.js? Ans: The URL module in Node.js splits up a web address into readable parts.  Use require() to include the module: var url = require( 'url' ); Then parse an address with the url . parse() method, and it will return a URL object with each part of the address as properties . var url = require( 'url' ); var adr = 'http://localhost:8080/default.htm?year=2021&month=september' ; var q = url . parse(adr, true); console . log(q . host); // returns 'localhost:8080' console . log(q . pathname); // retur

Latest Posts

Coding interview questions set 8

Node.js interview questions set 1

Rapid fire 28 javascript questions and answers .

Mongodb Basics Set 1: Insert Operation

Coding interview questions set 7

Data structure problem 2 (Stack): Valid Parentheses problem.

Create a multi column csv report in nodejs without external library.

Javascript interview questions set 3

CSS INTERVIEW QUESTIONS SET 2

Coding Interview questions set 6