cara menampilkan respons API di html
const urlSearchParams = new URLSearchParams(window.location.search);
let productId = urlSearchParams.get('id');
console.log(productId);
fetch('http://localhost:3000/api/products?ids')
.then(response => response.json())
.then(data => console.log(data));
let productArticle = document.createElement('article');
let productImage = document.createElement('img')
console.log(productImage);
let productTitle = document.getElementById('title')
console.log(productTitle);
let priceElement = document.getElementById('price');
console.log(priceElement);
let productDiscription = document.getElementById('description');
console.log(productDiscription);
let productColor = document.getElementById('colors');
console.log(productColor);
Powerful Peafowl