I'm still a beginner in Nextjs, trying to implement a simple javascript like:
document.addEventListener("scroll", function () {console.log("scroll!")})
how to add the function in a local file and then load it with <script/> in nextjs ?
P.S: i made a .js file with the function inside inside the project folder and tried to load it with next Script component but it gives me this error: Failed to load resource: the server responded with a status of 404 (Not Found)