├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Learn JavaScript with Eric Elliott 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rejection 2 | 3 | A portfolio project for professional developers to highlight skills with modern tech stacks like React, Redux, Serverless, etc. [EricElliottJS.com](https://ericelliottjs.com). 4 | 5 | Want to work as a team? 6 | 7 | You gotta lose to win. 8 | 9 | Train yourself to: 10 | 11 | * Get a raise 12 | * Sell more 13 | * Develop more business 14 | * Negotiate better deals 15 | 16 | The game has one rule: 17 | 18 | **You must be rejected by a human being at least once per day.** 19 | 20 | Ask for things outside your comfort zone, and you'll find yourself winning a lot more. 21 | 22 | Win = 1 point. 23 | Rejection = 10 points. 24 | 25 | How long can you make your rejection streak last? 26 | 27 | 28 | ## Basic Level 29 | 30 | Build a UI that lets you keep track of your score. Include a text input for the ask, who you asked, and two buttons: "Accepted" or "Rejected". For asynchronous requests such as emails or messages, record the score at the time you get the answer, not at the time you ask. 31 | 32 | Use HTML+CSS and store a record of the data in `localStorage`. 33 | 34 | Your data structure can be a simple array of ask objects: 35 | 36 | ```js 37 | interface Question { 38 | id: String, // id of the question so you can get/edit/remove by id 39 | timestamp: Number, // output from Date.now() 40 | question: String, // the ask 41 | askee: String, // person asked 42 | status: String // 'Accepted', 'Rejected', 'Unanswered' 43 | } 44 | ``` 45 | 46 | You can calculate everything else you need to know by reducing over the list of asks. 47 | 48 | It may be useful to display a running tally of the user's current score. Just remember that the current day's subtotal needs to be recalculated each time an ask is accepted or rejected, so it will be useful to keep the list in an array that you can [reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) with each new ask added by the user. 49 | 50 | 51 | ## Mid level 52 | 53 | Add an API to store data using a web service and database. Track multiple users (which means you'll need to [add user authentication](https://medium.com/javascript-scene/passwords-are-obsolete-how-to-secure-your-app-and-protect-your-users-1cd6c7b7c3bc)). 54 | 55 | Try [Firebase](https://firebase.google.com/) for data storage. 56 | 57 | 58 | ## Extra credit 59 | 60 | * Add mobile apps by turning your web app into a [Progressive Web Application](https://web.dev/pwa-checklist/). 61 | 62 | 63 | ## To Implement: 64 | 65 | 1. Fork this repo 66 | 2. Implement your solution. 67 | 3. Open an issue with a link to your fork. 68 | 69 | To get credit, you must [open an issue](https://github.com/learn-javascript-courses/rejection/issues/new?title=Challenge+completed+level:+basic/mid/advanced) with a link to your fork. 70 | --------------------------------------------------------------------------------