+ 7
18th Jan 2018, 2:06 AM
ARB
ARB - avatar
2 Antworten
+ 6
Because pro is a string so it fails to match a number. Add a parseInt() to convert around the prompt. var pro = parseInt(prompt("insert a number", 2));
18th Jan 2018, 2:23 AM
John Wells
John Wells - avatar
+ 10
Just a tip: When your question is solved considering marking the answer which helped you most as best (the tick on the left side of that answer) & if possible, add [Solved] before your question. That's all, Have a good day. (bye) https://www.sololearn.com/discuss/345567/?ref=app
18th Jan 2018, 3:00 AM
Lord Krishna
Lord Krishna - avatar