Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reassign Variables #37

Closed
gose opened this issue Jan 17, 2018 · 0 comments
Closed

Reassign Variables #37

gose opened this issue Jan 17, 2018 · 0 comments

Comments

@gose
Copy link

gose commented Jan 17, 2018

There is no way to reassign variables; we can only define them.

<% let foo = "bar" %>
  <%= for (a) in myArray { %>
    <%= if (foo != "baz") { %>
      <% let foo = "baz" %>
    <% } %>
  <% } %>
<% } %>

The inner foo loses scope. Removing the let from in front of it causes an error.

markbates added a commit that referenced this issue Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant