Detecting input in JS | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Detecting input in JS

Hi! I want to make a text adventure style game in JS, but I don't know how to detect and use player input. Help would be appreciated!!! Thanks!

26th Feb 2024, 7:37 PM
Antonio
Antonio - avatar
4 Answers
+ 2
creste a web code, use the prompt() function. if you need help with your code, show your code. https://www.geeksforgeeks.org/how-to-take-user-input-in-javascript/
26th Feb 2024, 7:44 PM
Lisa
Lisa - avatar
+ 1
there are several advanced text-adventure game projects on github. Might give you an idea on how others designed their games. https://github.com/topics/text-adventure-game?l=javascript or if you want a simple js one, here is a nice video https://youtu.be/R1S_NhKkvGA?feature=shared
27th Feb 2024, 12:37 PM
Bob_Li
Bob_Li - avatar
27th Feb 2024, 10:33 PM
JaScript
JaScript - avatar
0
Thank you!
26th Feb 2024, 8:35 PM
Antonio
Antonio - avatar