What software are you using?
I have just started and I haven't any information about coding
I'm going to move your post over to the Animate forum. The Coding Corner forum is more for general coding stuff whereas the Animate forum folk will be able to offer you more specific help for Animate.
Code to go to the next frame might look like this:
Code to go a frame that is up to 10 frames ahead of where you are now would look like this:
If you wanted to jump to a random frame starting at 15 and ending at 25, it would be like this:
Math.random() gives you a value between 0 and almost 1. Multiplying that by 10 would make the number be from 0 to almost 10.