Reputation: 335
Doing a game in Pixi.JS and I need to know if it's possible to render a different JS file on each page refresh. I'll have the js file names stored in an array, and would like to iterate through the array and render the indexes js file each time the page refreshes. I'm using vanilla Javascript, is this possible?
Upvotes: 0
Views: 75
Reputation: 1481
Yes,it is achievable.
Store the counter locally,increment it till the length of the array and based on the current counter value load the js.
refer http://www.w3schools.com/html/html5_webstorage.asp
Conditionally load JavaScript file
Upvotes: 1