Furthermore, you can manually create a linked list alongside a map to manage the cache and maintain the LRU (Least Recently Used) property: class Node { constructor ( key , value ) { this . key = key ; this . value = value ; this . prev = null ; this . next = null ; } } class LRUCache { constructor ( capacity ) { this . capacity = capacity ; this . map = new Map ( ) ; this . head = new Node ( 0 , 0 ) ; this . tail = new Node ( 0 , 0 ) ; this . head . next = this . tail ; this . tail . prev = this . head ; } _delete ( node ) { node . prev . next = node . next ; node . next . prev = node . prev ; } _add ( node ) { let temp = this . head . next ; this . head . next = node ; node . prev = this . head ; node . next = temp ; temp . prev = node ; } get ( key ) { if ( this . map . has ( key ) ) { let node = this . map . get ( key ) ; this . _delete ( node ) ; this . _add ( node ) ; return node . value ; } else { return - 1 ; } } put ( key , value ) { if ( this . map . has ( key ) ) { this . _delete ( this . map . get ( key ) ) ; } let node = new Node ( key , value ) ; this . _add ( node ) ; this . map . set ( key , node ) ; if ( this . map . size > this . capacity ) { let last = this . tail . prev ; this . _delete ( last ) ; this . map . delete ( last . key ) ; } } } This method introduces additional complexity by requiring the creation of a doubly linked list, but it effectively demonstrates how to implement an LRU Cache without utilizing the built-in ordered feature provided by JavaScript's Map.