CR_MS_Assessment2

CR_MS_Assessment2

CR_MS_Assessment2

The number of attempts remaining is 4

1 / 29

1. Correct fix

2 / 29

2. What is useState used for?

3 / 29

3. Why are callback props used?

4 / 29

4. What is conditional rendering?

5 / 29

5. Editing a ticket is

6 / 29

6.

What does this return? (Coding)
const [count,setCount]=useState(0);

7 / 29

What will this show? (Coding)
const rating = 4.8;
return

7. {rating > 4.5 && "Recommended"}

;

8 / 29

8. What is required when rendering lists?

9 / 29

What will this render? (Coding)
function App() {
return

9. Hello

;
}

10 / 29

10. What does JSX stand for?

11 / 29

What will this show? (Coding)
const isSunny=true;
return

11. {isSunny && 'Sunny Day'}

;

12 / 29

12. Props are

13 / 29

13. What does map() do in React?

14 / 29

14. Correct approach :

15 / 29

15. Props are used to

16 / 29

16. What is a React component?

17 / 29

17. What does useEffect do?

18 / 29

18.

What will happen here? (Coding)
useEffect(() => {
console.log("Hello");
}, []);

19 / 29

What will be displayed? (Coding)
const name='Rahul';
return

19. {name}

;

20 / 29

What will this render? (Coding)
const items = [];
return

20. {items.length && "Items exist"}

;

21 / 29

What is wrong here? (Coding)

22 / 29

22. Correct fix:

23 / 29

What will this render? (Coding)
const rating = 4.5;
return

23. {rating > 4.5 ? "Recommended" : "Normal"}

;

24 / 29

24.

What is wrong here? (Coding)
setItems(items.push(newItem));

25 / 29

25.

What will this do? (Coding)
setCount(count + 1);
setCount(count + 1);

26 / 29

26. What is props drilling?

27 / 29

27. What is CRUD?

28 / 29

28. What is a callback prop?

29 / 29

What will this render? (Coding)
const items = ["A", "B"];
return items.map((item, i) =>

29. {item}

);

Your score is