Assign other value to a variable from two possible values | Function to alternate the values ; Main function
function alternate ( a , b , x ) { x = a + b - x ; document . write ( " " + " " + " " + x ) ; } var a = - 10 ; var b = 15 ; var x = a ; document . write ( " " + x + " " ) ; alternate ( a , b , x ) ;