how do I make my javascript program to ask user to hit any key to exit?

44 views Asked by At

I'm new to javascript and I need help. I'm currently doing a project using javascript in which I'm tasked with creating some code which asks the user to hit any key to exit the javascript program. does anybody know how I can do this?

I've tried using the addeventlistener to detect user input but it doesn't seem to work for me.

Edit: I’m supposed to ask the user to input any key to exit the JavaScript program after it translates a number to the chosen language.

0

There are 0 answers