Hey atula.
Divers spitting on their their mask lens actually isn't to do with cleaning, they do it to prevent fogging, which is when your mask goes literally \"foggy\" when diving.
It's a quick and easy way just before you dive to spit on both sides of the dive mask lens, rub it in and rinse it out just before you go under - mostly prevents fogging.
Some people argue that you shouldn't do this because saliva contains bacteria which can cause black mould inside the mask. You can actually buy defogging solution for between £3-10 ($5-15), which does the same thing but without the spit
Personally, I swear by toothpaste. Rub a peasize amount with your finger into the mask lens on both sides, rub it in, wash it off and I've never had problems with fogging.