Displaying an example of the use of exports and modular thinking using JavaScript (without need for React, vue etc). Security will always be questionable which is why I would recomend building systems for IOS and Android as security is loads and loads better (even more than you are imaginging!).
Javascript 100s of ways to do any job!
Note - needs to run on a host (localhost is fine).