if (window.location.href.indexOf('index') != -1) {
scripts('js/scripts.js', 'js/scripts2.js');
}
function scripts(scriptSrcOne, scriptSrcTwo) {
var newScript = document.createElement('script');
newScript.src = [scriptSrcOne, scriptSrcTwo];
document.getElementsByTagName("body")[0].appendChild(newScript);
}
function loadScripts(arrScr) {
arrScr.forEach((src) => {
var scr = document.createElement('script');
scr.src = src;
document.body.appendChild(scr);
})
}
if (window.location.href.indexOf('index') != -1) {
loadScripts(['js/scripts.js', 'js/scripts2.js']);
}