This is a simple interface for executing individual JavaScript functions. Each function is intended to be a simple, stand-alone, "lightning exercise" completed by a student while learning the basics of programming in JavaScript.
-
Install Node.js version 14 or greater
-
Get the repo on your computer For example
git clone git@github.com:askingalot/bottle.git git remote rm origin git remote add origin <your remote repo>
-
Start the server
cd bottle npm start -
Open the application in your web browser. http://localhost:3001
-
Open the
bottledirectory in your editor of choice For example, using Visual Studio Codecode . -
Add the appropriate code to the functions in the JavaScript modules found in the
exercisesdirectory. -
To test your work after you've changed a function:
- Refresh the browser
- Select the module name from the module dropdown
- Select the function name
- Fill in any needed arguments
- Click the
Executebutton. - Confirm the result in the result panel. If there is a test associated with the function
bottlewill execute it and indicate whether your function passed or failed the test.
Once you've completed the existing exercises feel free to add your own. Any module you add in the exercises directory will appear in the Available Modules dropdown after you refresh the browser.