写于2017.08.04
var x = {name: 'x'}
var y = {name: 'y'}
function swapName(a,b){
var temp = a.name
a.name = b.name
b.name = temp
}
swapName(x,y)
console.log(x.name)
写于2017.08.04
var x = {name: 'x'}
var y = {name: 'y'}
function swapName(a,b){
var temp = a.name
a.name = b.name
b.name = temp
}
swapName(x,y)
console.log(x.name)