0

I am working on a CLI app using JS, and I want it to emit a noise when I call a specific function. What should I do?

function emitNoise(){
//noise emitting code
}
Angelina Tsuboi
  • 196
  • 1
  • 2
  • 14
  • 2
    I believe that there is already an answer for this here: [How I trigger the "System Bell" in nodejs](https://stackoverflow.com/questions/8557624/how-i-trigger-the-system-bell-in-nodejs). Also, if you want to accomplish it with a package instead, [this answer](https://stackoverflow.com/questions/12543237/play-audio-with-node-js) seems to provide some options. – Alexander Nied Aug 01 '20 at 04:27

1 Answers1

0
console.log('\u0007');

will trigger the system bell

dave
  • 62,300
  • 5
  • 72
  • 93