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 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 have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}
You have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}
You have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}
You have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}
You have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}
You have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}
You have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}
You have an array of tasks, where each task is an object with properties id, title, and completed. Write a JavaScript function that returns a new array containing only the titles of the tasks that are not completed, sorted alphabetically.
Which of the following functions correctly implements this?
- A . function getIncompleteTaskTitles(tasks) { return tasks.sort((a, b) => a.title.localeCompare(b.title))
.filter(task => !task.completed) .map(task => task.title);} - B . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => task.completed) .map(task => task.title) .sort((a, b) => a.localeCompare(b));}
- C . function getIncompleteTaskTitles(tasks) { return tasks.map(task => task.title) .filter(task => !task.completed) .sort((a, b) => a.localeCompare(b));}
- D . function getIncompleteTaskTitles(tasks) { return tasks.filter(task => !task.completed) .sort((a, b) =>
a.title.localeCompare(b.title)) .map(task => task.title);}