Skip to content

If/else and Switch operator #40

@boolka

Description

@boolka

Do not understand, but i have errors, while use switch or if/else op...
Somethin like this :
<% switch ( state ) { %>
   <% case 0: %>
    

some text


   <% break; %>
   <% case 1: %>
     

another one


   <% break; %>
<% } %>
or this :
<% if (state == 0) { %>
  

First state


<% } %>
<% else if (state == 1) { %>
  

Second state


<% } %>
but simple 'if' op is works
Error: " SyntaxError: Unexpected token ; "

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions