Skip to content

Exercise to practice refactoring old JavaScript to modern JavaScript / ES6

License

Notifications You must be signed in to change notification settings

davegoldsmith/javascript-refactoring-exercise

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗒️ Introduction

Its time to put those modern JavaScript skills into practice 🙌

We've created an existing JavaScript code base for you.

The purpose of this code is to produce sales information about transactions.

Given an input set of data such as this:

['notebook', 'notebook', 'mouse', 'keyboard', 'mouse']

It should produce a summary of what things have been purchased and how many of each item. The results should be sorted by the number of transactions, then alphabetically.

['mouse 2', 'notebook 2', 'keyboard 1'].

We've already created the unit tests to validate your solution.

The unit tests are currently passing. They should continue to pass after you have refactored the code.


🗒️ Instructions

✅ Read through this material carefully

✅ Arrange a time to meet up as a group (Note: You do NOT need a paid Zoom account. Zoom gives you 40 minutes free and you can just end the meeting at 40 minutes and start a new one)

✅ When you meet, discuss and make notes on the changes you would make to the code base and the reasons why (Note: You do NOT need to review the code shown in the tests only the implementation files)

✅ Choose one team member to fork and clone the repository and whilst still working as a group, work through and refactor the code. Remembering to commit little and often as you make changes to the code base.

✅ Later on in the week you'll present back to your fellow cohort members

✅ Prepare to share your creation! We will be hosting a session where you can demo your changes and why you made them back to the rest of the group. Please nominate a speaker for your team, or if you wish to, we encourage you give everyone in your team a chance to speak. 🗣


💥 Submission Process

✅ Send us a link to your forked GitHub repository (Note: All group members can send us the same link)

✅ Present your updates back to us during the sharing session

About

Exercise to practice refactoring old JavaScript to modern JavaScript / ES6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%