Use Javascript to open a directory?

How would I use JS to open testing.txt and read what is in it?
(I am using Javascript by having a .html file and using a <script> tag.)

You are viewing a single comment. View All

ugggh ig you don't know what promises are. You see, it takes some time to load the file, and JS doesn't like that, so it returns something called a promise, which will get resolved later on. What you want is:


Also, you forgot to set the type of the output lol