Question: I want to print this

```
<link rel="canonical" href="http://nyc.mymusicwebsite.com/coolband/1222
"/>

```

where

```
var termsText = nyc
var deliurl = http://nyc.mymagazine.com/coolband/122
deliurl2[1] = mymagazine
deliurl[2] = .com/coolband/122

```

(deliurl is split at .) I have this code so far which almost works, This is the problem

```
document.write('<link rel=cononical"'+" ""href="http:"//"""+termsText+"."+deliurl2[1]+deliUrl[2]'"/>');

```

my biggest problem is printing " for the href

Answer: 
That isn't how you escape double-quotes in JavaScript. Use `"\""`:

```
"This is a string \"full\" of \"scare quotes\".";

```

or alternate between single and double quotes:

```
'This string can "contain" unescaped "double quotes".'

```
```
document.write('<link rel="cononical"'+' href="http://'+termsText+'.'+deliurl2[1]+deliUrl[2]+'" />');

```