1
var MyLinkedList = function () {5
MyLinkedList.prototype.get = function (index) {6
if (index < this.linked.length) {7
return this.linked[index];12
MyLinkedList.prototype.addAtHead = function (val) {13
this.linked.unshift(val);16
MyLinkedList.prototype.addAtTail = function (val) {17
this.linked.push(val);20
MyLinkedList.prototype.addAtIndex = function (index, val) {21
if (index <= this.linked.length) {22
this.linked.splice(index, 0, val);26
MyLinkedList.prototype.deleteAtIndex = function (index) {27
this.linked.splice(index, 1);