How to import a JS File from backend to Home Page Code?

I’m creating a QR Code that store the information of my products, and I have no idea how to import my JavaScript from backend to home page code.

Please download software Jing or similar and paste in some more information like a screenshot of your site structure so I can understand more what you are trying to do here.

If you make code in an backend .js file you will have to use export function in that file on all functions that you want to use in the home page code.

Then in your homepage code you will need to import that particual functions into the home page.

import {functionname} from ‘backend/jsfilename’;

Hope that helps!