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
};
- A . let dog = new animal({ breed: ‘Dog’});
- B . let dog = function(animal) { this.breed = ‘Dog’;};
- C . let dog = Object.create(animal, { breed: { value: ‘Dog’ }});
- D . let dog = animal.create({ breed: ‘Dog’});
};
- A . let dog = new animal({ breed: ‘Dog’});
- B . let dog = function(animal) { this.breed = ‘Dog’;};
- C . let dog = Object.create(animal, { breed: { value: ‘Dog’ }});
- D . let dog = animal.create({ breed: ‘Dog’});
};
- A . let dog = new animal({ breed: ‘Dog’});
- B . let dog = function(animal) { this.breed = ‘Dog’;};
- C . let dog = Object.create(animal, { breed: { value: ‘Dog’ }});
- D . let dog = animal.create({ breed: ‘Dog’});
Which of the following regular expressions will correctly validate if the given string "A1b2C3" follows the pattern of alternating letters and digits?
- A . /([A-Za-z][0-9]){3}/
- B . /^([A-Za-z][0-9])+$/
- C . /^([a-zA-Z0-9])+$/
- D . /([a-zA-Z][0-9])+$/
Which of the following regular expressions will correctly validate if the given string "A1b2C3" follows the pattern of alternating letters and digits?
- A . /([A-Za-z][0-9]){3}/
- B . /^([A-Za-z][0-9])+$/
- C . /^([a-zA-Z0-9])+$/
- D . /([a-zA-Z][0-9])+$/
Which of the following regular expressions will correctly validate if the given string "A1b2C3" follows the pattern of alternating letters and digits?
- A . /([A-Za-z][0-9]){3}/
- B . /^([A-Za-z][0-9])+$/
- C . /^([a-zA-Z0-9])+$/
- D . /([a-zA-Z][0-9])+$/
Which of the following regular expressions will correctly validate if the given string "A1b2C3" follows the pattern of alternating letters and digits?
- A . /([A-Za-z][0-9]){3}/
- B . /^([A-Za-z][0-9])+$/
- C . /^([a-zA-Z0-9])+$/
- D . /([a-zA-Z][0-9])+$/
You are given an array of products, where each product is an object with properties name, category, and price. Write a JavaScript function that returns a new array containing only the names of products in the "Electronics" category, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getElectronicsNames(products) { return products.filter(p => p.category === "Electronics")
.sort((a, b) => a.name.localeCompare(b.name)) .map(p => p.name);} - B . function getElectronicsNames(products) { return products.sort((a, b) => a.name.localeCompare(b.name)) .filter(p => p.category === "Electronics") .map(p => p.name);}
- C . function getElectronicsNames(products) { return products.filter(p => p.category === "Electronics")
.map(p => p.name) .sort();} - D . function getElectronicsNames(products) { return products.map(p => p.name) .sort((a, b) =>
a.localeCompare(b)) .filter(p => p.category === "Electronics");}
You are given an array of products, where each product is an object with properties name, category, and price. Write a JavaScript function that returns a new array containing only the names of products in the "Electronics" category, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getElectronicsNames(products) { return products.filter(p => p.category === "Electronics")
.sort((a, b) => a.name.localeCompare(b.name)) .map(p => p.name);} - B . function getElectronicsNames(products) { return products.sort((a, b) => a.name.localeCompare(b.name)) .filter(p => p.category === "Electronics") .map(p => p.name);}
- C . function getElectronicsNames(products) { return products.filter(p => p.category === "Electronics")
.map(p => p.name) .sort();} - D . function getElectronicsNames(products) { return products.map(p => p.name) .sort((a, b) =>
a.localeCompare(b)) .filter(p => p.category === "Electronics");}
You are given an array of products, where each product is an object with properties name, category, and price. Write a JavaScript function that returns a new array containing only the names of products in the "Electronics" category, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getElectronicsNames(products) { return products.filter(p => p.category === "Electronics")
.sort((a, b) => a.name.localeCompare(b.name)) .map(p => p.name);} - B . function getElectronicsNames(products) { return products.sort((a, b) => a.name.localeCompare(b.name)) .filter(p => p.category === "Electronics") .map(p => p.name);}
- C . function getElectronicsNames(products) { return products.filter(p => p.category === "Electronics")
.map(p => p.name) .sort();} - D . function getElectronicsNames(products) { return products.map(p => p.name) .sort((a, b) =>
a.localeCompare(b)) .filter(p => p.category === "Electronics");}