I am confusing when dealing with the logic in Javascript and the ejs template. I could write all the logic inside the conditional statements such as for loop inside the temp