+ 1
*SOLVED* Can't get JavaScript to recognize variations
Started learning JavaScript two days ago. I've been trying to make simple mathematical function but JavaScript won't recognize variations given from prompts. https://code.sololearn.com/WTO4Rs03yViU/?ref=app
2 Answers
+ 2
Instead of local variables, declare the a and b variable as global
+ 4
addNum function doesn't know about variable a or b. either do what Calvin said or return a and b from top function get store it on addNum function