+ 2
Code Project 4 - prompt
Why doesn't prompt work here, yet works just fine in my code bit inventory???
14 Answers
0
Yes you're right, because in the code project you are using nodejs, not the web! You cannot use prompt() in nodejs, instead you should install libraries like prompt, or readline-sync, which you cannot do such a thing here in Sololearn.
Well, what's the solution!? 🤔
I don't know!! 😐
No, I'm not kidding I really don't know what to do, well I solved that 2 years ago, so I can't remember how did I do that, Sololearn has changed from 2yrs ago til now, so I don't know what do 😄😄
But we can ask help from Lisa...
+ 3
I think I recently reported the same issue to sololearn. Was it in Introduction to Javascript?
What happens when you click "Reset code" in the 3 dots menu?
+ 2
How can we help you when you haven't posted your code!!?
+ 1
Language?
+ 1
Shapa, it is working properly, what do you want it to be like?
+ 1
@Radin Masiha
This same code won't work in project 4 though, I keep getting errors.
+ 1
When you press "reset" it just clears entire code
+ 1
Shapa
node js doesn't have prompt function. It is a function of Javascript.
0
The language is Javascript in the code project 4 module
https://sololearn.com/compiler-playground/W0CFi0Qc3ttl/?ref=app
0
I've tried parseInt and many.
Still didn't work.
0
It is not because of parseInt, prompt is not supported as user input
0
Well, I guess there's no solving this.
0
Shapa, you are right, this is while it said the code to get the user input is already present. I think you should report this bug by sending a feedback to Sololearn, explaining your problem short and clearly.
Anyway, code projects aren't required to be solved; your code is correct, you have understood the concept (just note that you should parseInt your ans 😉), so continue learning.
GOOD LUCK.....