Closed moriseif closed 3 years ago
I have this code but I see a is not defined! .... <% const a="hi"; %>
It doesn't work that way. EJS renders the HTML template in its own context, usually on the server. That <script> tag is just part of the rendered HTML. The browser JS runs in the browser.
<script>
I have this code but I see a is not defined! .... <% const a="hi"; %>