Interview Question?

Build a rating system that allows users to click on star elements to provide their ratings for different products. It stores the ratings in the browser's local storage and persists them across page reloads.

iPhone 13

★ ★ ★ ★ ★

iPhone 14

★ ★ ★ ★ ★

iPhone 15

★ ★ ★ ★ ★