Question: how to subtract variables in javascript?
Answer: In this case, we will assign the numerical values to x and y and place the sum in z . Similarly, we use the minus sign ( - ) to subtract numbers or variables representing numbers.