I'm having some trouble within the console. I'm using the following code that takes an array of URL's and get the source code from those URL's.
var URL = ["http://www.website.com", "http://www.anotherwebsite.com"];
var str = [];
$.each(URL, function(index, fetch) {
$.get(fetch, function(sourcecode) {
str.push(sourcecode);
})
});
console.log(str);
This returns the following array within the console:
However, I need that array to turn into a single string of all the source code. I tried using str.join but that doesn't work. I need the console to look like this:
Maybe im just missing a simple piece of code, but I cannot get it to work.
Note: This is within a Google Chrome Extension so cross domain requests are not an issue.