loadStrings only works in the editor

I downloaded this working sketch but it didn’t work on my desktop.
Do I need a server to make loadStrings() get me a local disc file?
I will downloaded the project in the future when I figure out how:)
Mac 10.14.6. Thanx.

This is the code:

var result;
function setup() {
createCanvas(600, 300);

result = loadStrings( 
        "prism.txt", fileLoaded); 

}

function fileLoaded() {
for ( i=0 ; i<10; i += 1) {
print(result[i]);
}
}strong text

You have confirmed that loadStrings() does need a server for the same reason that my attempts to use Ajax locally have failed. This also means if I put the project on my website it should work. Is it enough to put just the model files on the web and run the p5js locally?

I want to send off my javascript program to show others my furniture designs. So it seems the only way to do this now is to include the model files in the header as <!script src=“g3s.js”> or add them directly as a script function. Thanx.