I have build a calculator and it shows following calculation wrong.
here is my calculate function
function calculate(firstNumber,operator,secondNumber){
let first=parseFloat(firstNumber);
let second=parseFloat(secondNumber);
switch(operator){
case 'add': return first + second;
case 'minus': return first - second;
case 'multiply': return first * second;
case 'divide': return first / second;
}
}