hello everyone. I think I don't know when to use an '=' or a ':' in an expression in JS. Can anyone kindly explain?
could you give some examples of what you dont understand?
read this blog may be help full
: is used inside objects for key-value pairs, and in ternary operators, and in destructuring when you both destructure and assign value to new variable
= is an assignment operator, it assign values of what is to the right of it to what is to the left of it.
Thanks a lot everybody. I’m grateful
ok, I have to specially thank you for this, It has helped me understand destructuring.