Javascript WorkFlow Series 1

List out all variables and functions

This is my work flow series for working through a javascript app. Basically disecting the app into small and workable units and seperate them into a Model, Controller, and View format.

First of all I go through the user stories and type the features or variables that the user story needs.

For example:

User Story: Each time I input a series of button presses correctly, I see the same series of button presses but with an additional step.

  • need a variable that a series of presses
  • need a function to insert User move into user input series
  • need a function compare series of preeses with computer generated series

Then I convert the features into a javascript code.

For example:

1
2
3
4
5
6
7
8
9
10
11
12
13
// need a variable that a series of presses
var userInput = [];

//need a function to insert User move into user input series

function userMove(value){
userInput.push(value)
}

//need a function compare series of preeses with computer generated series
function compare(randomSeriesValue, userInputValue){
return userInputValue === randomSeriesValue;
}

Then I test them out individually in console make sure each function works the way they are suppose to.

Here’s my first draft of the app github. As you can see I have all the variables and functions required for the app.