index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);出自这个方法:  Run: function(index) {
//修正index
index == undefined && (index = this.Index);
index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);
//设置参数
this._target = -Math.abs(this.Change) * (this.Index = index);
this._t = 0;
this._b = parseInt(CurrentStyle(this._slider)[this.options.Vertical ? "top" : "left"]);
this._c = this._target - this._b;

this.onStart();
this.Move();
  }
谢谢啊,急

解决方案 »

  1.   

     index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);
    就是一个赋值啊``如果index小于0就执行(index = this._count - 1) 如果index >= this._count 就执行 index = 0
      

  2.   

    相当于:
    if (index < 0) index = this._count - 1;
    else {
        if (index >= this._count) index = 0;
    }这是利用了运算符的优先级、结合性(具有相同优先级的运算符按从左至右的顺序求值)和逻辑与、逻辑或运算的简便运算特性,这里涉及到的优先级(高到低):
    <   >=
    &&
    ||
    =简便运算特性是指:
    &&运算时,如果第一个运算数值为false,不再计算第二个运算数值
    ||运算时,如果第一个运算数值为true,不再计算第二个运算数值
      

  3.   

    index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);
    噢,谢谢啊,明白了