LinkList.prototype.get = function (data) {标签:current,return,index,indexOf,42,链表,var,data From: https://blog.51cto.com/u_15460007/6050089
var current = this.head;
var index = 0;
//开始查找
while (current) {
if (current.data == data) {
return index;
}
current = current.next;
index += 1;
}
return -1;
};