Can you give me a step by step breakdown of how I would use this JS code?