Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· OpenAIAi2 WildChat-4.8M (AI2)

SyntaxError: missing ) after argument list in…

  1. User

    SyntaxError: missing ) after argument list in C:\Users\Ilya\Downloads\my-musician-network\views\search.ejs while compiling ejs

    	<label for="genre">Search by genre:</label> <select id="genre" name="genre">
    		<option value="">
    			All
    		</option>
    		<option value="Rock">
    			Rock
    		</option>
    		<option value="Pop">
    			Pop
    		</option>
    	</select>
    	
    

    Search by location:

    	<br>
    	<!-- Add new input field for location -->
    
    
    	<br>
    	
    	<br>
    	<button type="submit">Search</button>
    </form><%if (musicians.length > 0) { %>
    <h2>Results:</h2>
    <ul>
    	<%musicians.forEach(musician => { %>
    	<li>
    		<a href="<%= musician.profileLink %>"><%= musician.name %> <%if (musician.thumbnail) { %> <img src="/img/<%= musician.thumbnail %>" <% } else { %> <img src="" alt="Default Thumbnail"> <% } %> alt="<%= musician.name %>"> <%} %></a> - <%= musician.genre %> - <%= musician.location %> <%if (musician.soundcloud) { %> <a href="%3C%=%20musician.soundcloud%20%%3E">SoundCloud</a> <%} %>
    	</li><%}); %>
    </ul><%} else if (query || role || city || genre) { %>
    <p>No musicians found.</p><%} %>
    
  2. Assistant

    The code seems to be missing a closing curly brace for the if statement that checks if musician length > 0 before the ul tag. Add a closing curly brace after the closing tag for the li element. It should look like this:

    <% musicians.forEach(musician => { %>
      <li>
        <a href="<%= musician.profileLink %>">
          <%= musician.name %>
          <% if (musician.thumbnail) { %>
            <img src="/img/<%= musician.thumbnail %>" 
          <% } else { %>
            <img src="" alt="Default Thumbnail">
          <% } %> 
          alt="<%= musician.name %>"> 
        </a> - <%= musician.genre %> - <%= musician.location %> 
        <% if (musician.soundcloud) { %> 
          <a href="<%= musician.soundcloud%>">SoundCloud</a> 
        <% } %> 
      </li>
    <% }); %> 
    
  3. User

    дай мне конкретную часть там, где нет кавычек

  4. Assistant

    Извините, не совсем понятно, на какую часть кода вы ожидаете получить конкретный ответ. Можете задать более конкретный вопрос или привести участок кода, к которому у вас есть вопросы? Я буду рад помочь.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.