how to clear or overwrite document.write() on browser when my next filter(basically a condition) match in JS
问题 I have an array of objects. let mainMenu = [ { brand: "Zara", type: "Shirt", gender: ["Men", "Women", "Boys", "Girls"], size: "Small", image: "", description: "", price: "300", colour: "Red", stock: "10", discount: 5, rating: "4" }, { brand: "Nike", type: "Shirt", gender: ["Men", "Women", "Boys"], size: "Medium", image: "", description: "", price: "600", colour: "Red", stock: "20", discount: 5, rating: "5" }, { brand: "Adidas", type: "Shirt", gender: ["Men", "Women"], size: "Large", image: ""