G
GSN
I am trying to get something to happen if the day is either Friday,
Saturday or Sunday. So after creating a variable from getDay...
var this_weekday = this_date_timestamp.getDay();
I do the following:
if (this_weekday > 4 || this_weekday = 0)
{
//do something
}
else
{
//do something else
};
It isn't working. It works fine if I just write "if (this_weekday = 4
)" or "if (this_weekday > 4 )" but when trying to get use OR (||) I am
having no luck. Can someone help me with the proper syntax?
Saturday or Sunday. So after creating a variable from getDay...
var this_weekday = this_date_timestamp.getDay();
I do the following:
if (this_weekday > 4 || this_weekday = 0)
{
//do something
}
else
{
//do something else
};
It isn't working. It works fine if I just write "if (this_weekday = 4
)" or "if (this_weekday > 4 )" but when trying to get use OR (||) I am
having no luck. Can someone help me with the proper syntax?