You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//return the result of the two numbers having that operator used on them. The four operators are "add", "subtract", "divide", "multiply". Try to do it without using if statements!
function arithmetic(a, b, operator){
let pairs = {'add': '+','subtract':'-','multiply':'*','divide':'/'}