Javascript's most common functions Big-O Notation.
2 min readApr 26, 2020
Let’s analyze how Object and Array work through the lens of Big-O.
Object Big-O
Insertion, removal, and accessing of a key is constant time O(1). But searching is O(n). N is a number of keys.
Big-O of object Methods
Array Big-O
Big-O depends on where you are inserting and removing the element, at the end of array insertion and removal is constant time 0(1)
Big-O of Array Methods