3 Antworten
+ 6
Strings go inside "..." or '...' It must be alert("Regular price") not alert(Regular price) and so on
13th Nov 2024, 5:00 PM
Lisa
Lisa - avatar
+ 4
also Number(prompt()); not number(prompt()); and you probably don't need to convert to Number if you're not going to do any computations to it. Javascript is quirky because it can do comparison operations this way. This works: '5' < 10 which is unconventional behavior for most programming languages. https://www.w3schools.com/js/js_comparison.asp
13th Nov 2024, 11:09 PM
Bob_Li
Bob_Li - avatar
+ 2
Oh thank you
13th Nov 2024, 5:00 PM
Keystone745