Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (a, b, operator) {
- let operators = {'multiply': a * b , 'divide': a / b, 'add': a + b, 'subtract': a - b};
- console.log(operators[operator]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement