Skip to content

Module Quiz: Programming Paradigms :Mobile Development and JavaScript (Meta iOS Developer Professional Certificate) Answers 2026

Question 1

Which of the following variable declarations can be redeclared and reassigned?

var
❌ There are no variable declarations which can be redeclared and reassigned.
❌ const
❌ let

Explanation:
JavaScript me var ko same scope me dobara declare aur reassign dono kiya ja sakta hai. let reassign ho sakta hai par redeclare nahi, const na redeclare hota hai na reassign.


Question 2

What will print out when the following code runs?

❌ 33
❌ null
❌ 44
undefined

Explanation:
x ko function call ke baad declare kiya gaya hai, par hoisting ki wajah se variable exist karta hai (value undefined hoti hai).


Question 3

What will print out when the following code runs?

❌ 0
10
❌ 2
❌ 5

Explanation:
WeddingCake me super(2) → layers = 2
getLayers() = 2 * 5 = 10


Question 4

What is the function of extends in the following code block?

❌ Replaces the class Animal with the class Dog.
❌ Replaces the class Dog with the class Wolf.
❌ Creates a parent of the class Animal.
Creates a child Dog of the class Animal and a child Wolf of the class Dog.


Question 5

What is the value of …rest in the following code snippet?

❌ 2
❌ undefined
[3,4]
❌ 1

Explanation:
Array destructuring me ...rest baaki ke elements ko array me store karta hai.


Question 6

True or false: The rest parameter syntax allows a function to accept an indefinite number of arguments as an array.

True
❌ False


Question 7

getElementsByClassName is a method for doing which of the following?

❌ Checking for a class called Name
Querying the Document Object Model.
❌ Declaring a class called Name
❌ Return the first matching element with the specified Class.

Explanation:
Ye DOM method hai jo matching class wale elements ka collection return karta hai.


Question 8

Which of the following methods convert a JavaScript object to a JSON string?

❌ JSON.toString
JSON.stringify
❌ JSON.parse
❌ JSON.fromString


Question 9

What will be the result of running this code?

❌ a
❌ b
❌ Uncaught TypeError: Assignment to constant variable
Uncaught SyntaxError: Invalid or unexpected token

Explanation:
let letter = "a" letter = "b";
Yahan semicolon ya newline missing hai → syntax error.


Question 10

A function that is called to create an instance of an object is called what?

❌ Method
Constructor
❌ Argument
❌ An object literal


🧾 Summary Table

Question Correct Answer
Q1 var
Q2 undefined
Q3 10
Q4 Creates child Dog of Animal & child Wolf of Dog
Q5 [3,4]
Q6 True
Q7 Querying the Document Object Model
Q8 JSON.stringify
Q9 Uncaught SyntaxError
Q10 Constructor