Question

I'm using Zurb Foundation and am getting the following error

Uncaught SyntaxError: Unexpected token ?

From this block of code:

<script>
    document.write('<script src=http://[mydomain]/js/vendor/'
    + ('__proto__' in  ? 'zepto' : 'jquery')
    + '.js><\/script>');
</script>

The code appears to be in accordance with Zurb's documentation. Is this error something to be concerned about? If so, what could I do to resolve the error?

Was it helpful?

Solution

You are missing a variable in the below line:

+ ('__proto__' in  ? 'zepto' : 'jquery')

Should have been something like below:

+ ('__proto__' in myObject ? 'zepto' : 'jquery')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top