Check out example codes for "c++ how to do else if statements". It will help you in understanding the concepts better.

Code Example 1

if (condition) {
  // block of code to be executed if the 
  condition is true
}

Code Example 2

if (variable) {
  variable is true 
  }

Learn ReactJs, React Native from akashmittal.com