How do you fetch local or relative files from a directory in JavaScript?
Here’s my code:
const p = document.querySelector("p");
// How do i fetch local files?
Here is a data sample I formatted in JSON:
{
"id": 12022,
"sampleText": "This is a String"
}