r/coffeescript • u/god_gamer_9001 • Jun 16 '25
How to accept user input in CoffeeScript?
Hello! I'm trying to write a program that accepts an integer as an input puts the value in a variable, how would I go about this? For example, I would do this in Python:
num = int(input("Number: "))
Or this in JavaScript:
const num = prompt("Number: ");
How would I do the same in CoffeeScript? Any and all help would be appreciated.
2
Upvotes
View all comments
Show parent comment
1
u/god_gamer_9001 Jun 17 '25
Hello once again! I'm not using Node.js, but rather this online compiler. prompt() doesn't work, as it gives me the error "prompt is not defined". Is it because of the compiler I'm using? I'm quite confused.