CR_MS_Assessment2

CR_MS_Assessment2

CR_MS_Assessment2

The number of attempts remaining is 4

1 / 29

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

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

;

2 / 29

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

2. {name}

;

3 / 29

3. Props are used to

4 / 29

4. What is a callback prop?

5 / 29

5. Correct approach :

6 / 29

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

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

;

7 / 29

7. What does JSX stand for?

8 / 29

8.

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

9 / 29

9. Correct fix

10 / 29

10. Why are callback props used?

11 / 29

11. What is props drilling?

12 / 29

12.

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

13 / 29

13. What is conditional rendering?

14 / 29

14. What is useState used for?

15 / 29

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

15. {isSunny && 'Sunny Day'}

;

16 / 29

16. Editing a ticket is

17 / 29

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

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

;

18 / 29

18. What is CRUD?

19 / 29

19. Correct fix:

20 / 29

20. What is a React component?

21 / 29

21. What is required when rendering lists?

22 / 29

22. Props are

23 / 29

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

23. {item}

);

24 / 29

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

24. Hello

;
}

25 / 29

25. What does useEffect do?

26 / 29

26. What does map() do in React?

27 / 29

27.

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

28 / 29

28.

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

29 / 29

What is wrong here? (Coding)

Your score is