นี่คือการนำคลาส LinkedList มาใช้งานอย่างสมบูรณ์: ตัวอย่าง class LinkedList { constructor() { this.head = null; this.length = 0; } insert(data, position = this.length) { let node = new this.Node(data); if (this.head === null) { this.head = node; this.length