03_ITPComputerScience/Practice Problems/PP01/PP01script.js
/*
 * 3. Write a program to swap two numbers without third variable.
 */
3. Write a program to swap two numbers without third variable.
3 . Write a program to swap two numbers without third variable .
function swapwithoutTemp(a, b)
{
    console.log ("BEFORE: "+ "a = " + a + " b = " + b);
    a = a + b;
    b = a - b;
    a = a - b;
    console.log ("AFTER: "+ "a = " + a + " b = " + b);
}
function swapwithoutTemp ( a , b ) { console . log ( "BEFORE: " + "a = " + a + " b = " + b ) ; a = a + b ; b = a - b ; a = a - b ; console . log ( "AFTER: " + "a = " + a + " b = " + b ) ; }
3.
3 .