Conditional Statements in EJS

  WE USE THE TAG  "<%"

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>RollDice</title>
</head>
<body>
    <h1>dice value: <%= diceVal %></h1>
    <% if(diceVal==6){ %>
        <h2> TRY AGAIN!!! </h2>
   <% } %>
</body>
</html>

Comments

Popular posts from this blog

DATABASE RELATIONSHIPS

ROUTING (GET /) home route

Query Strings