javascriptgoogle-sheetsgoogle-apps-scriptboolean-operations

Adding clause of and/or to if statement


I need to include and/or statement to an if condition in Google pps Script. I am new to script and am not able to find a way to do so.

if (dateval<>"") and (repval<>"") {condition if true}

Solution

  • you can find all the infos on that subject (and others ) on this site.

    in your example the answer is

    if (dateval!="" && repval!="") {do something}