safak / youtube

5.07k stars 5.49k forks source link

How can i write the filter function in such a way that if the value is array then return one block of code if not then return another block of code #140

Open Manojooo7 opened 1 year ago

Manojooo7 commented 1 year ago

I write the code like this but it gave me an error

`

Color {product.color?.map((c)=>( : setColor()} /> ))} `
saad-official commented 1 year ago

maybe you are doing syntax error google it you will easily find it

Manojooo7 commented 1 year ago

maybe you are doing syntax error google it you will easily find it

thank you