//Assume we are coding inside //the LinkedList class (our context) let node = this.firstNode; let data = (node != null) ? node.getData() : null;
//Assume we are coding inside //the LinkedList class (our context) let node = this.lastNode; let data = (node != null) ? node.getData() : null;