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

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 140161

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>