How Use images from javascript array in react using filter and map function
问题 I have a javascript array like this: const IMGS = [{ id: 0, path: "../img/a1.jpeg", }, { id: 1, path: "../img/a1-01.jpeg", }, { id: 2, path: "../img/a1-02.jpeg", }, { id: 3, path: "../img/a1-03.jpeg", } ] export default IMGS; There are more images I am just showing few of them, I need to show all the images in react from this array. The condition is the image_id should be >=18 but <30 . How can I achieve that? (I need to know the syntax). I know I can do it using filter or map function,