Python Institute JSA-41-01 Practice Exams
Last updated on Oct 24,2026- Exam Code: JSA-41-01
- Exam Name: JSA - Certified Associate JavaScript Programmer
- Certification Provider: Python Institute
- Latest update: Oct 24,2026
Question #462
Which of the following code snippets correctly implements a generator function and uses it as an element of an iterable object to generate a sequence of numbers from 1 to 5?
- A . function generateNumbers() { for (let i = 1; i <= 5; i++) { yield i; }}const numbers = […generateNumbers()];
- B . function* generateNumbers() { for (let i = 1; i <= 5; i++) { yield i; }}const numbers = […generateNumbers()];
- C . function* generateNumbers() { for (let i = 1; i <= 5; i++) { yield i; }}const numbers =
generateNumbers(); - D . function* generateNumbers() { for (let i = 1; i <= 5; i++) { yield i; }}const numbers = { [Symbol.iterator]: generateNumbers};for (const num of numbers) { console.log(num);}
Correct Answer: D
Question #482
myDog.speak();
- A . The code will throw an error because Dog does not have a constructor
- B . The Dog class correctly overrides the speak method of the Animal class
- C . The output will be "Rex barks."
- D . The output will be "Rex makes a noise."
Correct Answer: B, C
Question #482
myDog.speak();
- A . The code will throw an error because Dog does not have a constructor
- B . The Dog class correctly overrides the speak method of the Animal class
- C . The output will be "Rex barks."
- D . The output will be "Rex makes a noise."
Correct Answer: B, C
Question #482
myDog.speak();
- A . The code will throw an error because Dog does not have a constructor
- B . The Dog class correctly overrides the speak method of the Animal class
- C . The output will be "Rex barks."
- D . The output will be "Rex makes a noise."
Correct Answer: B, C
Question #482
myDog.speak();
- A . The code will throw an error because Dog does not have a constructor
- B . The Dog class correctly overrides the speak method of the Animal class
- C . The output will be "Rex barks."
- D . The output will be "Rex makes a noise."
Correct Answer: B, C
Question #482
myDog.speak();
- A . The code will throw an error because Dog does not have a constructor
- B . The Dog class correctly overrides the speak method of the Animal class
- C . The output will be "Rex barks."
- D . The output will be "Rex makes a noise."
Correct Answer: B, C
Question #482
myDog.speak();
- A . The code will throw an error because Dog does not have a constructor
- B . The Dog class correctly overrides the speak method of the Animal class
- C . The output will be "Rex barks."
- D . The output will be "Rex makes a noise."
Correct Answer: B, C
Question #488
console.log("Promise created");
- A . "Success!" followed by "Promise created"
- B . "Promise created" followed by "Success!"
- C . "Success!" only
- D . "Promise created" only
Correct Answer: B
Question #488
console.log("Promise created");
- A . "Success!" followed by "Promise created"
- B . "Promise created" followed by "Success!"
- C . "Success!" only
- D . "Promise created" only
Correct Answer: B
Question #488
console.log("Promise created");
- A . "Success!" followed by "Promise created"
- B . "Promise created" followed by "Success!"
- C . "Success!" only
- D . "Promise created" only
Correct Answer: B