Exit vs return vs break and continue

  • exit
  • return
  • break
  • continue

  • exit will stop your program no matter where you call it.
  • return will return from a function (it will stop the specific function only)
  • break will stop the current "while" or "for" loop
  • continue will stop the current iteration of the current "while" or "for" loop