js实现两个数的加减乘除运算,并输出结果。 function getResult(arr) { switch (arr[1]) { case '+': //因为输入的数字为字符型,所以要将类型转换为数字型 return parseFloat