Node.js pop() function Last Updated : 30 Mar, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report pop() is an array function from Node.js that is used to remove elements from the end of an array. Syntax: array_name.pop() Parameter: This function does not take any parameter. Return type: The function returns the array. The program below demonstrates the working of the function: Example 1: javascript function POP() { arr.pop(); console.log(arr); } const arr = [1, 2, 3, 4, 5, 6, 7]; POP(); Output: [ 1, 2, 3, 4, 5, 6 ] Example 2: javascript function POP() { arr.pop(); console.log(arr); } const arr = ['GFG']; POP(); Output: [] Example 3: javascript const Lang = ['java', 'c', 'python']; console.log(Lang); // expected output: Array [ 'java', 'c', 'python' ] Lang.pop(); console.log(Lang); // expected output: Array [ 'java', 'c' ] Output: [ 'java', 'c', 'python' ] [ 'java', 'c' ] Comment More infoAdvertise with us Next Article Essence of Node.js T Twinkl Bajaj Follow Improve Article Tags : Web Technologies Node.js NodeJS-function Similar Reads Node.js push() function push() is an array function from Node.js that is used to add elements to the end of an array. Syntax:array_name.push(element)Parameter: This function takes a parameter that has to be added to the array. It can take multiple elements also. Return type: The function returns the array after adding the 1 min read Essence of Node.js Node.js or Node has a small core group of modules, commonly referred to as the Node Core that is exposed as the public Node API by using we write our applications or we can say that the Node Core implements the public Node API. Some examples of the modules present in the node core are: To work with 8 min read Node.js Process exit Event The process is the global object in Node.js that keeps track of and contains all the information of the particular node.js process that is executing at a particular time on the machine. The process.exit() method is the method that is used to end the Node.js process. Every process action on the mach 2 min read Collect.js pop() Method The pop() method is used to remove the last element from collection and returns the popped element. Syntax: collect(array).pop() Parameters: The collect() method takes one argument that is converted into the collection and then pop() method is applied on it. Return Value: This method returns the pop 1 min read Node.js Events An event in NodeJS is an action or occurrence, such as a user click, a file being read, or a message being received, that NodeJS can respond to. Events are managed using the EventEmitter class, which is part of NodeJS's built-in events module. This allows NodeJS to react to various actions asynchron 7 min read What is Chunk in Node.js ? In Node.js, the term "chunk" refers to a small, manageable piece of data that is part of a larger dataset. Node.js processes data in chunks, especially when dealing with streams, which makes handling large files or data sources more efficient and memory-friendly. This article explores what chunks ar 4 min read Like