If you ever encounter a Javascript conditional statements without the curly braces i.e:

if (true)
  alert("Condition is true");
  alert("Condition is false");

don’t freak out. Some people like to skip the curly braces for simple or one-line conditionals. This code is valid. I personally use curly braces for all my conditional statements. I learned using them when I first started learning Javascript. There are various styling guides and it depends on the person writing the code. What I have read online is to always be consistent with whatever style you choose. If you are already coding for a living make sure to follow the style guide at the company you code for.