Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138163

Using Variable in a path Javascript

$
0
0

const dispatcher = connection.playFile('C:/Users/Discord/Desktop/${myArray[Math.floor(Math.random() * 10)]}');

I need the string in the connection.playFile function to be able to take a value from an array so that I can pass in filenames.


Viewing all articles
Browse latest Browse all 138163

Trending Articles