# restart script in javascript? built in function?



## Sphinx (Aug 5, 2003)

Hi, is there some built-in function in javascript that restarts the script from the beginning?

I have a button that says 'new game' and I need a way when the user clicks it for the entire program/script to restart.

Thanks


----------



## covert215 (Apr 22, 2006)

declare the script as a function. for the button


----------

