Gilded Rose Kata in JavaScript