Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 416 Bytes

Pop.md

File metadata and controls

55 lines (35 loc) · 416 Bytes

.pop()

Removes and returns the last item in the node.


Usage

const item = node.pop();


Examples


Array Node

{ 1 , 2 , 3 }
node.pop(); // Returns 3

Properties Node

{ a { 1 } b { 2 } }
node.pop(); // Returns Node(b)

Empty Node

{ }
node.pop(); // Returns undefined