120 likes | 141 Views
Top 10 Most Important Interview Question and Answer of Node JS.<br>It will be very helpful for you to get knowledge and help to get job in MNC. <br>If You want to learn Node JS course then you can join our online as well as offline classes from industry expert trainers. For More info, call Us: 70-70-90-50-90<br><br>To Know More, Visit Our Website: https://tutorials.ducatindia.com/<br><br>
E N D
NODE JS INTERVIEW QUESTION 070709 05090 070709 05090 https://tutorials.ducatindia.com https://tutorials.ducatindia.com
Q1). Explain Node JS? Node JS is open source platform or cross-platform which runs as back-end JavaScript runtime environment on chrome (V8 engine). It supports following OS, Z/OS, Linux, macOS, Microsoft Windows, open BSD, SmartOS.
Q2). Features of Node JS? Main features of Node JS is Productivity, Fast, Real-Time Application, asynchronous and Streaming in Node JS. PRODUCTIVITY FAST ASYNCHRONOUS REAL TIME APPLICATION STREAMING
Q3). Who developed Node JS and how to use REPL in Node JS? Node JS was developed in 2009 by Ryan Dahl. First if you want to know the version of node js then write following command as- “Node –v”. REPL means Read Evaluate Print Loop. When you type something in prompt and click to execute then REPL Process the prompt and give output in prompt. REPL read the prompt, evaluate it and then print the result and show the prompt with specific loop.
Q4). REPL commands in Node JS? Below are some REPL main commands: Ctrl+c = For terminating current command Ctrl+c twice = for terminating REPL. Ctrl+d- for terminating REPL Tab keys – list of all current commands. Break – exit from multiline expression. Save with filename – save REPL session to a file.
Q5). Explain NPM in Node JS? NPM is three different things; stand for node package manager, its Idea about managing the packages. Let’s suppose the third party library like lodash. Lodash is very good library having amazing manipulation feature used for JavaScript. Usually what developer does, developer go to library and download the source and save to the project. So, JavaScript has its own package manager or library for the convenience. So, NPM has following features-:
Q6). Explain callback in Node.JS and how it can be more scalable? Callback asynchronous been completed. Callbacks are heavily use by Node.js and all API’S OF Node.js is written to support callbacks. is called operation when has
Q7). How it can be more scalable? Node.js works well for input output bound but not CPU bound work. For instance, to read a file if there is a function then file reading will be started during that instruction and once input output is done, callback function is called. So, no blocking will be there with callbacks.
Q8). Explain global and local of dependencies of Node.js 1. Globally installed packages are stored in < user-directory>/npm directory and these dependencies used in CLI (command line interface) of any node.js. NPM will install the dependencies in local mode by default. Local mode refers to package installation in node_modules directory lying in the folder where node application is present. 2.
Q9). Explain child process module and why to use exec, fork, spawn() method for child process module? To create child process module you have following three ways-: Spawn: It launches new process with command child.process Exec: child_process_exec method runs command in shell/console and buffers the output. Fork:It is special case of spawn to create child processes command as child_process
Q10) Explain Stream Pipe method in Node.js ? Stream method denoted as stream.pipe(), this method used for taking readable stream and connect it to writeable stream. Streams in node.js used to handle asynchronous process. It also helps in buffer data, it collects the data as it comes in until you are ready to use it or until all the data has arrived from stream.