How to swap two numbers without using a temporary variable ? | Javascript program to swap two numbers without using temporary variable ; Code to swap ' x ' and ' y ' x now becomes 50 ; y becomes 10 ; x becomes 5
var x = 10 ; var y = 5 ; x = x * y ; y = x / y ; x = x / y ; document . write ( " " + " " + x + " " + y ) ;