Skip to content
Advertisement

random equations in javascript

JavaScript
JavaScript

I want my code to create simple equations. You can put in answers and it tells you if you are correct or not. When I run this simple code, input the right answer and click on check, it doesn’t show correct. why is this and how can I fix?

Advertisement

Answer

In your code, check() requires two arguments rand1 and rand2, which you are not passing while calling it from onclcik.

Following code should work, check it…

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement