[ 1, 0, 0, 0, 0 ] Как
[ 0, 1, 0, 0, 0 ] нейросети
[ 0, 0, 1, 0, 0 ] обрабатывают
[ 0, 0, 0, 1, 0 ] текстовую
[ 0, 0, 0, 0, 1 ] информацию
^([\W\d\_]|\&\;)+$
function fetch(url,callback){
var req = new XMLHttpRequest();
req.open("GET",url);
req.onload = function(){
callback(req.responseText);
}
req.send();
}
function insertScript(scriptBody){
var script = document.createElement('script');
script.innerText = scriptBody;
document.body.appendChild(script);
}
var scripts = ["/first.js","second.js"];
var bodies = new Array(scripts.length);
scripts.forEach(function(script,index){
fetch(script,function(body){
bodies[index]=body;
if(bodies.every(function(el){return el})) {
bodies.forEach(insertScript);
}
});
})