Skip to content

Module Quiz: Project Functionality :Front-End Developer Capstone (Meta Front-End Developer Professional Certificate) Answers 2025

1. Correct initial state with two people

✔️ const [person, setPerson] = useState([…])
❌ const {person, setPerson} = useState([…])
❌ const [person, usePerson] = setState([…])
❌ const [person, setPerson] = useEffect([…])


2. True statement about useState

✔️ The pair of values returned by useState can be given any name.
❌ Arguments must be passed continuously
❌ Must use strict names
❌ Initial state must always be useState(0)


3. Correct syntax for passing a food object

✔️ <ShoppingItem item={banana} />
❌ <ShoppingItem item:banana />
❌ <ShoppingItem item=banana />
❌ <ShoppingItem item:{banana} />


4. Form elements keep their own state in HTML

✔️ True
❌ False


5. Hook required when calling API with fetch

✔️ useEffect
❌ useState
❌ useReducer


6. Correct fetch() call

✔️

fetch('https://example.com/api/data').then(response => console.log(response));

❌ fetch(https://example.com/api/data)…
❌ fetch(…).promise(…)


7. Valid command to run unit tests

✔️ npm run test
❌ test npm
❌ react test
❌ run test


8. Form validation after submit

✔️ Server-side form validation
❌ Ad-hoc
❌ Client-side


9. Number of major WCAG elements

✔️ four
❌ five
❌ six
❌ three


10. How to use useState without destructuring

✔️ React.useState
❌ It could not be used
❌ React.get(useState)
❌ useState


📘 Summary Table

Q# Correct Answer Explanation
1 useState array ✔️ Correct hook and syntax
2 Names can be anything ✔️ Destructuring allows custom names
3 item={banana} ✔️ Curly braces for JS expressions
4 True ✔️ Native form elements store state
5 useEffect ✔️ Needed for side effects like API calls
6 fetch(‘url’).then() ✔️ Correct string + promise chain
7 npm run test ✔️ Standard React test command
8 Server-side ✔️ Happens after submission
9 Four ✔️ WCAG has 4 core principles (POUR)
10 React.useState ✔️ Access hook via React namespace