In JavaScript--and indeed in virtually every computer language out there--a string starts with " and ends with the next ".
So you have ONLY A SINGLE STRING THERE!
Code:
"<a href='http://www.' + myurl[i] + target='_blank'>"
JavaScript WILL NOT inject stuff into the middle or a string. Period. (Unlike PHP.)
Also, since you really ought to be using "..." around HTML attributes.
So:
Code:
var myurl=new Array("google.com", "yahoo.com");
for (i=0;i<=myurl.length-1;i++){
var url = myurl[i];
document.writeln('<a href="http://www.' + url + '" target="_blank">' + url + '</a>');
}
HOWEVER... If at all possible, you should *NOT* be using document.write. It's way way obsolescent.
***********
EDIT: Ehhh...too slow again. Well, you can see we basically agree. But I would definitely swap your usage of ' and ".