Both of these statements work:
<% if(currentUser.collegeLevel === "High School") { %>
<h1> They have a High School Degree </h1>
<% } %>
<% if(currentUser.collegeLevel === "Associates Degree") { %>
<h1> They have an Associates Degree </h1>
<% } %>
This statement does NOT work
<% if(currentUser.collegeLevel === "Associates Degree" || "High School") { %>
<h1> They have either a High school or Associates Degree</h1>
<% } %>
why does the OR function not work?
Aucun commentaire:
Enregistrer un commentaire