javascript in Adobe Animate frames

To learn and experiment with JavaScript I am using the following approach/structure:
I have individual blocks of code in several individual frames, all of them in one Action named layer.
This way I can have only one Animate file to contain all my testing.

On frame One I have the following code:

this.stop()  //this is optional HERE
alert("Frame ONE")

//frame number to go to
    var myFrame = nn //(I replace nn with either 5, 10, 15, 20, 25 etc)
//5 10 15 etc are the frame numbers where I have JS code

myFrame -= 1     //create.js => frame number - 1
this.gotoAndPlay(myFrame);

When I run the above code (CTRL+Enter) with any valid nn value, a new tab is opened BUT the expected code does not execute.

I am getting these error msgs in Chrome:

Uncaught SyntaxError: Unexpected token ‘)’ SandBoxt.js:3520
and
Uncaught ReferenceError: AdobeAn is not defined SandBoxt.html?10700:24
at init (SandBoxt.html?10700:24:11)
at onload (SandBoxt.html?10700:48:44)

My impression is that all (my currently fifteen blocks of) code in individual frames are checked regardless of which individual block I am trying to excute.
Nowhere do I have a 3520 line number. (This is, I guess, a cumulative line count).

I would like to hear from you people a suggestion on a clever/efficient way to find the offending line.
Thank you all very much in advance.

I am trying to comment each entire code in frame one by one but I still could not find the error.