I would like to know which is the difference between these expressions:
case a:
const functionA = () => {
executeA(), executeB()
}
case b:
const functionA = () => {
executeA();
executeB();
}
I would like to know which is the difference between these expressions:
case a:
const functionA = () => {
executeA(), executeB()
}
case b:
const functionA = () => {
executeA();
executeB();
}
They do exactly the same thing, but the first one is weird and the second one is the normal way of writing code. Don't use the first version.
The first one is an expression that uses comma operator
The other one is two statements.
There is no difference between these two in this situation.