Cocos Creator
Script Asset
Script assets are script files that stores user program for components, data classes and other logics.
To create a component script: Create and use component.
Everything you need to know about scripting in Cocos Creator: Scripting workflow.