Error in Rails with JS code
<p>Rails will not let me run JS code, I have these errors</p>

<p>1) </p>

<p><a href="https://i.stack.imgur.com/M661m.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M661m.jpg" alt="enter image description here"></a></p>

<p>2)</p>

<p><a href="https://i.stack.imgur.com/tmnRL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tmnRL.jpg" alt="enter image description here"></a></p>

<p>whenever you add JS code, the errors appear.
Some idea why this happening?</p>