How to use a single script for my 2 html file

i want to ask if it is possible to use a single JavaScript file on 2 different html file?

what i do is i create a 2 html file named index.html and seller.html and i used the

<script src="/scripts/app.js"></scrip>

on both html file. however it seems it doesn’t work.