Module quiz: Interacting with REST APIs in React Native :Working with Data (Meta React Native Specialization) Answers 2025
1. Question 1
Output of JSON.stringify()?
✔️ ‘{“name”:”Meta User”,”email”:”mataUser@example.com“,”password”:”abc123$”}’
❌ Undefined
❌ The object literal
2. Question 2
console.log(obj.count) prints:
✔️ 20
❌ true, 20
❌ true
3. Question 3
Convert JSON object to JSON string:
✔️ JSON.stringify()
❌ Strings and JSON are same
❌ JSON.parse()
4. Question 4
Valid JSON:
✔️ Option 1
The only one with:
-
keys in quotes
-
valid array structure
-
valid object structure
5. Question 5
JSON is language-dependent?
✔️ False
❌ True
JSON is language-independent.
6. Question 6
Fetch & render image from network:
✔️
<Image source={{uri: 'https://reactjs.org/logo-og.png'}}
style={{width: 400, height: 400}} />
❌ Missing style
❌ Wrong source format
7. Question 7
HTTP calls in React Native are async?
✔️ True
❌ False
8. Question 8
Default fetch method?
✔️ GET
❌ POST
❌ PUT
9. Question 9
Property to set POST / PUT / DELETE method?
✔️ method
❌ headers
❌ body
10. Question 10
Correct JSON syntax rules:
✔️ Elements in an array are separated with commas.
❌ Objects are separated with square brackets.
✔️ Names and values are separated with a colon.
Correct answers: 1 & 3
📘 Summary Table
| Q | Correct Answer(s) | ✔️ |
|---|---|---|
| 1 | JSON string | ✔️ |
| 2 | 20 | ✔️ |
| 3 | JSON.stringify() | ✔️ |
| 4 | First option | ✔️ |
| 5 | False | ✔️ |
| 6 | Image with uri + style | ✔️ |
| 7 | True | ✔️ |
| 8 | GET | ✔️ |
| 9 | method | ✔️ |
| 10 | Array commas, colon between name:value | ✔️ |