Difference between compareTo and equals function/method

 compareTo() Method


This method compares two string lexicographically i.e this method tell how two string are compared.


This method return int type values. i.e (Positive, Zero, Negative).


Positive Value = if String first is greater than String second(Unicode Value).


Zero Value = if String first is equals to String second.


Negative Value = if String first is less than String second(Unicode value).




Equals() Method


This method tells about the equality of two Stirngs.


This method return boolean value i.e True or False;


If two Strings are equal it will return True Value else it will print false Value.

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...