Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 427 Bytes

Shift.md

File metadata and controls

55 lines (35 loc) · 427 Bytes

.shift()

Removes and returns the first item in the node.


Usage

const item = node.shift();


Examples


Array Node

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

Properties Node

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

Empty Node

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