Difference between EDITOR vs VISUAL shell variables?

I read from man page that they both used to set up text editor name. What is the difference between EDITOR & VISUAL shell variables on Linux? Can you please explain it?

They both define editor that must be used by default. The main differnce is that:

  1. The EDITOR must work without any advanced terminal functionality
  2. The VISUAL is used by all modern apps and terminals. You need to set up VISUAL to a full-screen editor such as vi/vim, emacs, nano, and so on.

See $VISUAL vs. $EDITOR variable – what is the difference?