code fellows 301
- A controlled component is a component that renders from elements and controls them by keeping the form data in the component's state.
- We update the state with their responses as soon as they enter them to update the react state and other UI elements at the same time.
- You use a ternary operator in place of an if statement.
- Rewrite the following statement using a ternary statement:
if(x===y){
console.log(true);
} else {
console.log(false);
}let ans = (x===y) ? true : false
console.log(ans);