Answer the question
In order to leave comments, you need to log in
What is the difference between short notation if with brackets and without?
What is different, for example:
save ? save.addEventListener("click", () => ShowSpinButton('edit_labels')) : null
From:(save) ? save.addEventListener("click", () => ShowSpinButton('edit_labels')) : null
Answer the question
In order to leave comments, you need to log in
Nothing.
Parentheses are needed to group and change the priority of operations. In this case, inside the brackets is a degenerate expression from one variable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question