When you edit a script, we can right-click and choose Execute Script from the dropdown menu to do a quick evaluation of the selected text. A more detailed test environment for scripts is the JavaScript view where we can execute scripts and look at the script engine variables in a separate window:
Parent topic: JavaScript Enhancements