simple javascript code dont get executed

Just starting out? Need help? Post your questions and find answers here.
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

simple javascript code dont get executed

Post 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
falsam
Posts: 286
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

Re: simple javascript code dont get executed

Post by falsam »

Line 4 if instead of If ^^

➽ Windows 11 - jdk-11.0.2 - SB 3.00 - Android 15
https://falsam.com

Sorry for my poor english
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

Re: simple javascript code dont get executed

Post by T4r4ntul4 »

Thanks for the quick response, would have never find that one.
Post Reply