Giter VIP home page Giter VIP logo

javascript-exercises's People

Contributors

jfarmer avatar tannerwelsh avatar treiff avatar zspencer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

javascript-exercises's Issues

Ensure stylistic consistency across all exercises

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:

var ____ = ____(sentence) {
  return ____._____(____, ____);
};

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:

  • Statements to be executed from the browser's JS console
  • Code wrapped in a <script> tag which produces either a visual result (i.e. changes the DOM) or logs messages to the console

Multiple pages in browser

Must provide students with functional skeletons of all source files.

All source files must be enclosed in their own named directory.

Write first few levels of each target area

Syntax and Idioms

  • Z- Level 1 - Functions and Variables (defining and calling)
  • Z - Level 2 - Crab Claws { }, Hugs ( ), and Full Stops ;
  • T - Level 3 - Embedding JavaScript in a Web Page - #6
  • T - Level 4 - Running JavaScript in your Browser Console

Algorithms and Computer Science

  • Level 1 - Letters and Words
  • Z - Level 2 - Numbers!
  • Z - Level 3 - Making Decisions and Repeating Yourself (ifs and fors)
  • Z - Level 4 - Collections! Arrays and Objects Oh My!

Events and Callbacks

  • T - Level 1 - Passing functions to functions - #3
  • T - Level 2 - setTimeout and setInterval - #5
  • T - Level 3 - Publish and Subscribe (hey here's a gif to use)
  • Level 4 - Understanding this

Interacting with the User

  • T - Level 1 - Collecting input from the command line - #4
  • T - Level 2 - Finding and changing elements on a web page [*prioritize] - #7 & #8
  • Level 3 - Getting data from a form
  • Level 4 - Responding to user interactions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.