explain ternary operator with example?,Welcome to the solution site, which is interested in answering educational questions, as it provides an answer to your questions in all areas
The solution site is concerned with questions, answers and solutions for all study materials for all levels
Through the word “Ask a Question” at the top of the site, you can ask any topic or any question or inquiry you want answered by users specialized in solving questions and educational and academic activities that you ask
Now let’s answer your question
explain ternary operator with example
WMThe ternarccy operator is an operator that exists in some programming languages, which takes three operands rather than the typical one or two that most operators use. It provides a way to shorten a simple if else blssssssock. For example, consider the below JavaScript code. var num = 4, msg = “”; if (num === 4)