Random js name/encrypt

Hi, I wanted to ask if anyone new how to produce a random name / unacessable js or css file. I’ve been to a few sites in the past to have a look at the source and when you go to look at the CSS or JS they have something like:

<script type=“text/javascript” src=“js-file.js**?12312557**”></script>

By doing so it seems to make it impossible for people to view it and I want to be able to do something similar.

Anyone know how to do this? Or familiar with it?

Cheers.