I have a very simple if then statement that is not working as expected and I can't figure out why.
This is a subsection of code that I was working and have broken it down to the most basic script that is not working.
var x = 2;
if(x = 1)
{
Logger.log("July");
}
Logger.log(x);
I have hard coded x =2 and said if x =1 then log the word "July" and also logged the value of x.. after running my log shows July and 1. Both values are wrong. What am I missing?