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
console.log(countries.CAN.population);
- A . countries[countryCode].population = newPopulation;
- B . countries.update(countryCode, { population: newPopulation });
- C . countries.countryCode.population = newPopulation;
- D . countries[countryCode] = { population: newPopulation };
console.log(countries.CAN.population);
- A . countries[countryCode].population = newPopulation;
- B . countries.update(countryCode, { population: newPopulation });
- C . countries.countryCode.population = newPopulation;
- D . countries[countryCode] = { population: newPopulation };
console.log(countries.CAN.population);
- A . countries[countryCode].population = newPopulation;
- B . countries.update(countryCode, { population: newPopulation });
- C . countries.countryCode.population = newPopulation;
- D . countries[countryCode] = { population: newPopulation };
console.log(countries.CAN.population);
- A . countries[countryCode].population = newPopulation;
- B . countries.update(countryCode, { population: newPopulation });
- C . countries.countryCode.population = newPopulation;
- D . countries[countryCode] = { population: newPopulation };
console.log(countries.CAN.population);
- A . countries[countryCode].population = newPopulation;
- B . countries.update(countryCode, { population: newPopulation });
- C . countries.countryCode.population = newPopulation;
- D . countries[countryCode] = { population: newPopulation };
console.log(countries.CAN.population);
- A . countries[countryCode].population = newPopulation;
- B . countries.update(countryCode, { population: newPopulation });
- C . countries.countryCode.population = newPopulation;
- D . countries[countryCode] = { population: newPopulation };
You are using the Factory pattern to create objects without a class.
Which of the following code snippets correctly implements a Factory function to create Person objects with name and age properties?
- A . function createPerson(name, age) { this.name = name; this.age = age;}let person = new createPerson(‘John’, 30);
- B . class PersonFactory { constructor(name, age) { this.name = name; this.age = age; }}let person = new PersonFactory(‘John’, 30);
- C . const createPerson = (name, age) => ({ name: name, age: age});let person = createPerson(‘John’, 30);
- D . function createPerson(name, age) { return { name: name, age: age };}let person =
createPerson(‘John’, 30);
You are using the Factory pattern to create objects without a class.
Which of the following code snippets correctly implements a Factory function to create Person objects with name and age properties?
- A . function createPerson(name, age) { this.name = name; this.age = age;}let person = new createPerson(‘John’, 30);
- B . class PersonFactory { constructor(name, age) { this.name = name; this.age = age; }}let person = new PersonFactory(‘John’, 30);
- C . const createPerson = (name, age) => ({ name: name, age: age});let person = createPerson(‘John’, 30);
- D . function createPerson(name, age) { return { name: name, age: age };}let person =
createPerson(‘John’, 30);
You are using the Factory pattern to create objects without a class.
Which of the following code snippets correctly implements a Factory function to create Person objects with name and age properties?
- A . function createPerson(name, age) { this.name = name; this.age = age;}let person = new createPerson(‘John’, 30);
- B . class PersonFactory { constructor(name, age) { this.name = name; this.age = age; }}let person = new PersonFactory(‘John’, 30);
- C . const createPerson = (name, age) => ({ name: name, age: age});let person = createPerson(‘John’, 30);
- D . function createPerson(name, age) { return { name: name, age: age };}let person =
createPerson(‘John’, 30);
You are using the Factory pattern to create objects without a class.
Which of the following code snippets correctly implements a Factory function to create Person objects with name and age properties?
- A . function createPerson(name, age) { this.name = name; this.age = age;}let person = new createPerson(‘John’, 30);
- B . class PersonFactory { constructor(name, age) { this.name = name; this.age = age; }}let person = new PersonFactory(‘John’, 30);
- C . const createPerson = (name, age) => ({ name: name, age: age});let person = createPerson(‘John’, 30);
- D . function createPerson(name, age) { return { name: name, age: age };}let person =
createPerson(‘John’, 30);