Node.js Quiz | Set-3
Which below module is used to get end-of-line character as specified by the operating system ?
Question 1 Explanation:
The os.EOL comes with an os module which is used to get an end-of-line character or marker as specified by the operating system. It returns the end of the line marker.
Which method in Node.js are used to get system uptime in seconds ?
Question 2 Explanation:
The os.uptime() is the method in Node.js that is used to get system uptime in seconds. This method does not accept any parameters.
How do we get the filename portion of a path to the file in Node.js ?
Question 3 Explanation:
The path.basename() method in node.js is used to get the filename portion of a path to the file. This directory was ignored when using this method. It takes a two-parameter as path and extension.
Which below in Node.js are used to join a number of path segments ?
Question 4 Explanation:
The path.join() is used to join a number of path segments using the platform-specific delimiter to form a single path. The final path joining takes place. It takes comma-separated values.
Which below method is responsible for parsing and formatting URL query strings ?
Question 5 Explanation:
The Query String is used as utilities for parsing and formatting URL query strings.
Which data-handling method and is used to read or write input into output sequentially ?
Question 6 Explanation:
Streams are the data-handling method and it is used to read or write input into output as sequence manner. The main advantage of Streams is used to handle reading or writing the files.
Which method is used to return all the remaining input stored in the internal buffer as a string ?
Question 7 Explanation:
The stringDecoder.end() is a method that is used to return the input stored into the buffer as string format.
Which method finds the maximum number of sockets that will be left open in the free state ?
Question 8 Explanation:
The agent.maxFreeSockets is used to sets the maximum number of sockets that will be open in the free state. This node does not accept any parameters.
Which property is used to yields an object listing Zlib-related constants ?
Question 9 Explanation:
The zlib.constants property is used to yields an object listing Zlib-related constants. It returns all the Zlib-related constants.
Which v8 method is used to serialize any type of data into a buffer using default serializer ?
Question 10 Explanation:
The v8.serialize() is a method in node.js that is used to serialize any type of data into the default serializer. It takes the parameter as a value.
There are 15 questions to complete.
My Personal Notes arrow_drop_up