Language Basics JavaScript Tutorial

Code blocks indicates a series of statements that should be executed in sequence.
Code blocks are enclosed between an opening brace ({) and a closing brace (}).

if (test1 == "red") {
   test1 = "blue";
   alert(test1);
}