Google Apps Script Data Types, Variables, Special characters and Comments
Google Apps Script Data Types, Variables, Special characters and Comments Numbers Defining a number in Google Apps Script is actually pretty simple. The Number data type includes any positive or negative integer, as well as decimals. Entering a number into the logger will return it right back to you. function code1(){ var accountNumber=123456701; Logger.log(accountNumber) } O/p=[18-02-15 15:21:05:813 IST] 1.23456701E8 Arithmetic operations You can also perform calculations with numbers pretty easily. Basically type out an expression the way you would type it in a calculator. function code2(){ var sum=1+3.2; Logger.log(sum); } O/p=[18-02-15 15:21:06:813 IST] 4.2 Comparing numbers Comparisons between numbers will either evaluate to true or false. function code3(){ var comp=6>11; Logger.log(comp); } o/p=[18-02-15 15:21:06:813 IST] false function code4(){ var comp=6<11; Logger.log(comp); } o/p=[18-02-15 15:39:59:907 IST] true String Strings are a collect...