I try to declare bool variable and then check it, inside function, but I get error that there is unexpected identifier pointing to line where daysCreated is comparing to false
<script type="text/javascript">
var daysCreated = false;
function createDays() {
if daysCreated == false {
//do something
}
daysCreated = true;
}
}
function createDays
is being called on button click inside document.