An Ecommerce cart with pre-selected items
----> https://cart-gilt.vercel.app
- Html
- CSS
- Javascript
- Adobe XD
- Visual Studio Code
- Codepen
- Git
- IconScout⭐
- Friconix
- Font Awesome
- Google Fonts
- Icons8
- Flavicon
//changing the color of the first item
let heart = document.getElementById('heart');
let index = 0;
const colors = ['red', 'grey'];
heart.addEventListener('click', function onClick() {
heart.style.color = colors[index];
index = index >= colors.length - 1 ? 0 : index + 1;
});