Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge completed level: basic #19

Open
prahaladbelavadi opened this issue Jul 17, 2017 · 1 comment
Open

Challenge completed level: basic #19

prahaladbelavadi opened this issue Jul 17, 2017 · 1 comment
Assignees

Comments

@prahaladbelavadi
Copy link

Code
Reject Counter

@ericelliott
Copy link
Contributor

Good start!

Great looking style, but the rejection challenge is more than a counter, and you're not quite finished, yet.

The idea is to keep a log of questions. From the README:

  • Include a text input for the ask, who you asked, and two buttons: "Accepted" or "Rejected".
  • Use HTML+CSS and store a record of the data in localStorage.

There's even a sample of the data structure for you to use -- as you can see, it's not a counter that you simply add to when the buttons are clicked:

{
  timestamp: Number,   // output from Date.now()
  ask: String,         // the ask
  askee: String,       // person asked
  status: String       // 'Accepted' or 'Rejected'
}

You don't need to record the score -- you should reduce over this array to calculate it, instead. That way, the record of ask objects are the single source of truth for the score.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants