201603061528_《Javascript交换两个变量值(不借用第三变量)》

/*=================================
@DESC:Exchange two value without third var.
@AUTHOR: Not me.
@DATE:2016-3-6 15:33  
==================================*/


var a = "Apple";
var b = "Banana";
var a = [b, b = a][0];


alert(a);  //Banana

 

posted @ 2016-03-06 15:35  Coca-code  阅读(304)  评论(0编辑  收藏  举报