EJS Instructor Guide

You Do solutions

These are some potential solutions to the You Do exercises in this lecture.

Syntax You Do

Use conditional rendering solution:

<% let showMessage = true %>
<% if (showMessage) { %>
  <p>This is a dynamic message!</p>
<% } %>

Incorporate the output tag solution:

<% let favoriteNumber = 7 %>
<p>My favorite number is <%= favoriteNumber %></p>

🏗️ Under Construction

We are constantly working to improve our resources for instructors and students.

Have something to contribute to this Instructor Guide? Let us know.