function exchange(a,b){ var temp=a; a=b; b=temp; console.log('a=' + a + ', b=' + b ); } exchange(1,2)