Page 1 of 1

simple javascript code dont get executed

Posted: Thu Oct 27, 2016 10:35 pm
by T4r4ntul4
I narrowed the code down to where the problem is. I wanted to check if a local storage was empty or not, but nothing is happening in the browser.

The webconsole says: 'SyntaxError: missing ; before statement'. For what i can see, iam not missing any ';'

What do i miss here?

Code: Select all

!v_gettotalscore = localStorage.getItem("points");
Debug gettotalscore

!If (localStorage.getItem("points") === null){
  !v_something = 1;
!}
  
Debug something

Re: simple javascript code dont get executed

Posted: Thu Oct 27, 2016 11:14 pm
by falsam
Line 4 if instead of If ^^

Re: simple javascript code dont get executed

Posted: Thu Oct 27, 2016 11:23 pm
by T4r4ntul4
Thanks for the quick response, would have never find that one.