You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the copy and code in exercises should conform to a style guide.
For the JS code, we should just pick a style guide and use it.
For our own copy and "starter code", we should enforce some basic principles. Rules can be discussed in the comment thread here and then added to this description before being ported to an official document.
JavaScript Exercises Style Guide
All exercises should live in their own, executable .js files.
The core mechanic of the exercises is to replace missing parts of a script so that it performs as specified in a use case.
Missing parts of a script must be identified by four (4) consecutive underscore _ characters, as in this example:
All of the copy and code in exercises should conform to a style guide.
For the JS code, we should just pick a style guide and use it.
For our own copy and "starter code", we should enforce some basic principles. Rules can be discussed in the comment thread here and then added to this description before being ported to an official document.
JavaScript Exercises Style Guide
All exercises should live in their own, executable
.js
files.The core mechanic of the exercises is to replace missing parts of a script so that it performs as specified in a use case.
Missing parts of a script must be identified by four (4) consecutive underscore
_
characters, as in this example:Environmental constraints
Command line execution with node.js
Test cases must be written at the bottom of the file and wrapped in a
if (!module.parent) { ... }
block.Single page in browser
Must provide students with a functional skeleton of an HTML file to open in their browser.
Test cases should be written as either:
<script>
tag which produces either a visual result (i.e. changes the DOM) or logs messages to the consoleMultiple pages in browser
Must provide students with functional skeletons of all source files.
All source files must be enclosed in their own named directory.
The text was updated successfully, but these errors were encountered: