Gilded Rose Kata

My Contribution

  • Refactor gilded_rose's update function
  • Use JavaScript Best Practices
  • Write clean code
  • Write test cases
  • Tried DRY principle

How to use this project

Cope and Paste the following commands to your terminal

git clone git@github.com:zainsadaqat/gilded-rose-kata.git

cd gilded-rose-kata

npm install

Code Screenshots

  • Use JS best practices to use const for arrays and objects instead of var

js_best_practices

  • For readability, use forEach() instead of for loop.

forEach

  • Create a function to check item name

check_item_name

  • Create a function to check item quality

check_quality

  • Create a function to check item sell in

check_sellin

  • Use logical operators instead of nested if condition

instead_of_nested_if_use_logical