岁月静好,淡然前行

var life = (function(think, done){

  var happiness = 0, target = 0;

  if(think == true){

    target++;

    happiness--;
    if(done == true){

      target++;

      happiness += 2;

    }else{

      target = 0;

      happiness = 0;

    }

  }else{

    happiness++;

    target=0;

  }
  return {happiness : happiness, target : target};

}(isThink, idDone));

posted @ 2017-03-22 14:00  笑逗逗  阅读(224)  评论(0编辑  收藏  举报