Unexpected token function

I have an error in my app, can’t figure out myself. I have a subroutine. Beginning of the sub, I have this err:violation added non-passive event listener to a scroll-blocking event. Consider making event handler as ‘passive’ to make the page more responsive. Any ideas, anyone?

Initially I made my responsive app scroll. Later on set to false. (previsely). Now, I saved enableappsxroll to true then false. So, no more this err.but ,chrome still says uncaught syntaxerror:unexpected token ‘function’. Line 522 column 25

From the beginning until now, my app continues to responsive and scroll

var counter
counter = 1000;
Do {
  NSB.Print("Infinite Loop: " + counter);
  If(counter >= 1000000 )  { break; }
  counter = counter * 10;
} While(1);
End JavaScript  
End Function

'Uncaught SyntaxError: Unexpected token '{'.
'line 4 column 8

Even sample JavaScript gives an error.

Forget to type:Function Button1_onclick()

My phone gives me http:\www.nsbasic.com. May I know what is the url?

The question isn’t clear. Under what circumstances do you see this?

I open a new prj, paste the javascipt do while sample ;unexpected ‘{’ is what I get in chrome. May be the appstudio version of mine is corrupted. This afternoon went to appstudio Web site, wanted to download a fresh copy. But the site was under maintenance.

I think my English is very poor;what I wanted to know is the official Web site url, for downloading purpose. Sorry for my poor English.

You can download here:

The site was having problems with downloading from DropBox yesterday. It’s now on Amazon S3.

Can you paste here exactly what you are pasting into Chrome? It’s unlikely AppStudio is corrupted.

See 3/11n4/11 above

I believe it should be do not Do which would explain why it is then giving a syntax error

'do stuff
If count >=6 then exit do

'something like this? I think it would raise an error

Tip: If you’re pasting code, html or config files, surround it by triple back ticks (```) and it will be fomatted properly.

The problem is that some of the lower case characters got changed to upper case. Here’s the correct code to paste in the console:

var counter;
counter = 1000;
do {
  NSB.Print("Infinite Loop: " + counter);
  if(counter >= 1000000 )  { break; }
  counter = counter * 10;
} while(1);

Thanks a lot. All my previous err was gone. As I alter a lot of old code. Now I have go into next phrase, nan err.