Python Institute JSA-41-01 Practice Exams
Last updated on Oct 22,2026- Exam Code: JSA-41-01
- Exam Name: JSA - Certified Associate JavaScript Programmer
- Certification Provider: Python Institute
- Latest update: Oct 22,2026
You are creating a class hierarchy for an educational platform. You have a User class with a method
getRole(), and you extend this class with an Instructor class that overrides the getRole()
method. If an instance of Instructor calls the getRole()
method, which method will be executed?
- A . The getRole() method in the User class.
- B . The getRole() method in both classes, starting with User.
- C . It depends on the order of inheritance.
- D . The getRole() method in the Instructor class.
You are creating a class hierarchy for an educational platform. You have a User class with a method
getRole(), and you extend this class with an Instructor class that overrides the getRole()
method. If an instance of Instructor calls the getRole()
method, which method will be executed?
- A . The getRole() method in the User class.
- B . The getRole() method in both classes, starting with User.
- C . It depends on the order of inheritance.
- D . The getRole() method in the Instructor class.
You are creating a class hierarchy for an educational platform. You have a User class with a method
getRole(), and you extend this class with an Instructor class that overrides the getRole()
method. If an instance of Instructor calls the getRole()
method, which method will be executed?
- A . The getRole() method in the User class.
- B . The getRole() method in both classes, starting with User.
- C . It depends on the order of inheritance.
- D . The getRole() method in the Instructor class.
You are creating a class hierarchy for an educational platform. You have a User class with a method
getRole(), and you extend this class with an Instructor class that overrides the getRole()
method. If an instance of Instructor calls the getRole()
method, which method will be executed?
- A . The getRole() method in the User class.
- B . The getRole() method in both classes, starting with User.
- C . It depends on the order of inheritance.
- D . The getRole() method in the Instructor class.
console.log(productIDs.size);
What will the console.log statement print?
- A . 4
- B . 2
- C . 1
- D . 3
console.log(productIDs.size);
What will the console.log statement print?
- A . 4
- B . 2
- C . 1
- D . 3
console.log(productIDs.size);
What will the console.log statement print?
- A . 4
- B . 2
- C . 1
- D . 3
console.log(productIDs.size);
What will the console.log statement print?
- A . 4
- B . 2
- C . 1
- D . 3
console.log(greet());
- A . Hello, my name is Bob.
- B . Hello, my name is undefined.
- C . ReferenceError: greet is not defined
- D . TypeError: Cannot read property ‘name’ of undefined
Which of the following code snippets correctly defines and calls a method on a classless object to print the object’s properties?
- A . let obj = { name: ‘John’, printDetails: function() { return this.name; }};console.log(printDetails());
- B . let obj = { name: ‘John’, printDetails: function() { console.log(name); }};obj.printDetails();
- C . let obj = { name: ‘John’, printDetails() { console.log(this.name); }};obj.printDetails();
- D . let obj = { name: ‘John’, printDetails: function() { console.log(this.name); }};obj.printDetails();