What does question mark mean in react?



What does question mark mean in react?..

Answer / Parmatma Gupta

In React, a question mark is used as a conditional operator (ternary operator) to render different UI based on a given condition. It takes the form of `condition ? expressionIfTrue : expressionIfFalse`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

How will you create new object in javascript?

1 Answers  


What are the requirements of web application using javascript?

1 Answers  


How to find radio button selection when a form is submitted?

1 Answers  


What are different types of inheritence? Which inheritance is followed in javascript.

1 Answers  


What are the data types available in javascript? Explain

1 Answers  


List few advantages of using javascript?

1 Answers  


What is difference between java and javascript?

1 Answers  


Is not a function error in javascript?

1 Answers  


Which is better typescript or javascript?

1 Answers  


How to detect browser name using JavaScript?

1 Answers  


What is DOM? What is the use of document object?

1 Answers  


What is spread operator react?

1 Answers  


Categories