how to calculate two values in javascript with different condition then add them code example Example: add two numbers javascript var x = 2 + 3; //x = 5