<code> element

Code snippet

The push() method adds one or more elements to the end of an array and returns the new length of the array.

Multiple lines of code

  
  if (hour < 18) {
    greeting = "Good day";
  } else {
    greeting = "Good evening";
  }