Why use switch instead of if in javascript
When we have several conditions, using of Switch instead of if in javascript, is Clear.
#advantages of switch over if-else:#
switch statement works much faster than an equivalent if-else
It’s more readable
Look at this code:
if (x === 15) {
ale...
seyedahmaddv.hashnode.dev1 min read