ternary operator javascript
the solution site, which is interested in answering educational questions, as it provides an answer to your questions in all areas and undergraduate majors Students’ activities and research and crossword puzzles
The solution site is concerned with questions, answers and solutions for all study materials for all educational stages
on the solution site, you can ask your doubts, curiosity, questions and whatever going on in your mind either related to studies or others. Experts and people from different fields will answer.
Through the word “Ask a Question” in the solution site, you can ask any topic or any question or inquiry you want answered by teachers specialized
to solving questions and educational and academic activities that you ask
Now let’s answer your question
The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark ( ? ), then an expression to execute if the condition is truthy followed by a colon ( : ), and finally the expression to execute if the condition is falsy.