I have some javascript
<script>
// some java code that doesn't matter right now
localStorage.setItem("myName", "Bob");
alert(localStorage.myName);
<script>
it works just fine (giving an alert message that says Bob). that's fine and dandy but what I really want is to pass a java variable to a javascript variable and have that print out instead. But when I put these lines into it...
var hi5 = <%= "getMyName();" %>
localStorage.someName = hi5;
It quits. Any javascript before that works fine. but any javascript after it just doesn't show up.
now the <% %>
tags might not be in the exact syntax but it doesn't really give me any errors
I'm sure I'm overlooking something but I'm not sure what it would be. What can I do?