Ask coding questions

← Back to all posts
The prompt
TheDNAHero

When I enter a prompt, there is always a > before the prompt. How do I remove this? I am trying to mirror another project in a different language, and that is the only difference.

Voters
TheDNAHero
Comments
hotnewtop
li1201

It is probably because you are using the prompt() function which is a browser-designed function. Since you are using Node.JS, it would have to improvise and prompt with the >. Instead, you could use a Node module like readline. Link

TheDNAHero

@li1201 oh, but is there an easier way?

li1201

I am not sure, most likely not. You could convert your project to JS instead of Node.JS @TheDNAHero

Highwayman

maybe try just process.stdin.read. That interface isn't too bad..
@TheDNAHero

Highwayman

or wait no it was more like

Or something. I'd have to read the docs again..
@Highwayman

Highwayman

oops, I mean on('data'.
ehe. Today is just not my day apparently, lol.
@Highwayman

TheDNAHero

The repl that I am trying to mirror is this: https://replit.com/@DobbsStudent0/Address-book#main.py