20:00

Free Test
/ 10

Quiz

1/10
Which of the following methods will correctly perform a deep clone of an object in JavaScript?
Select the answer
1 correct answer
A.
original.clone()
B.
JSON.parse(JSON.stringify(original))
C.
Object.create(original)
D.
Object.assign({}, original)

Quiz

2/10
Consider the following JavaScript code snippet: 1. const book = { 2. title: 'The Great Gatsby', 3. author: 'F. Scott Fitzgerald', 4. getSummary: function() { 5. return `${this.title} by ${this.author}`; 6. } 7. }; 8. 9. const getBookSummary = book.getSummary; 10. console.log(getBookSummary()); // What will this log to the console?
Select the answer
1 correct answer
A.
ReferenceError: title is not defined
B.
null
C.
The Great Gatsby by
D.
undefined by undefined
E.
Scott Fitzgerald', 4. getSummary: function() { 5. return `${this.title} by ${this.author}`; 6. } 7. }; 8. 9. const getBookSummary = book.getSummary; 10. console.log(getBookSummary()); // What will this log to the console? A. ReferenceError: title is not defined

Quiz

3/10
Consider the following JavaScript code snippet: 1. const obj = { 2. prop: 42, 3. func: function() { 4. return this.prop; 5. } 6. }; 7. 8. const extractedFunc = obj.func; 9. console.log(extractedFunc()); // What will this log to the console?
Select the answer
1 correct answer
A.
42
B.
TypeError: extractedFunc is not a function
C.
undefined
D.
null

Quiz

4/10
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?
Select the answer
1 correct answer
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);}

Quiz

5/10
You have the following JavaScript code: 1. let config = { 2. server: "localhost", 3. port: 8080, 4. options: { 5. secure: true, 6. timeout: 5000 7. }, 8. features: { 9. feature1: "enabled", 10. feature2: "disabled" 11. } 12. }; 13. 14. let key = "features"; 15. let subKey = "feature1"; 16. let dynamicKey = "timeout"; Which two of the following expressions correctly access the value 5000 from the config object?
Select the answer
2 correct answers
A.
config["options"]["timeout"]
B.
config[key][subKey]
C.
config.options.timeout
D.
config[key].options[dynamicKey]

Quiz

6/10
Consider the following code snippet: 1. let sentence = new String(" JavaScript "); 2. let trimmedSentence = sentence.trim().padEnd(15, "."); 3. console.log(trimmedSentence); What will be the output?
Select the answer
1 correct answer
A.
"JavaScript..."
B.
"JavaScript"
C.
"JavaScript....."
D.
" JavaScript "

Quiz

7/10
You are tasked with writing a JavaScript function that takes multiple arguments and returns the sum of those arguments. If no arguments are provided, the function should return a default value of 10. Which implementation correctly achieves this using default parameter values, the rest parameter, and the spread operator?
Select the answer
1 correct answer
A.
function sum(...args, defaultValue = 10) { return args.length ? args.reduce((a, b) => a + b, 0) : defaultValue;}
B.
function sum(args = [10]) { return args.reduce((a, b) => a + b, 0);}
C.
function sum(defaultValue, ...args = [10]) { return args.reduce((a, b) => a + b, 0);}
D.
function sum(defaultValue = 10, ...args) { return args.length ? args.reduce((a, b) => a + b, 0) : defaultValue;}

Quiz

8/10
Consider the following JavaScript code: 1. class BankAccount { 2. static totalAccounts = 0; 3. 4. constructor(owner, balance) { 5. this.owner = owner; 6. this.balance = balance; 7. BankAccount.incrementAccounts(); 8. } 9. 10. static incrementAccounts() { 11. BankAccount.totalAccounts++; 12. } 13. } 14. 15. let account1 = new BankAccount('Alice', 1000); 16. let account2 = new BankAccount('Bob', 1500); 17. let account3 = new BankAccount('Charlie', 2000); 18. 19. console.log(BankAccount.totalAccounts); What will be the output of console.log(BankAccount.totalAccounts) ?
Select the answer
1 correct answer
A.
2
B.
1
C.
3
D.
0

Quiz

9/10
Which two options correctly demonstrate different ways to create a new object with a name property set to "Gadget" without using a class?
Select the answer
2 correct answers
A.
const obj2 = new Object(); obj2.name = "Gadget";
B.
const obj5 = new Function();obj5.name = "Gadget";
C.
const obj6 = function() { this.name = "Gadget"; };
D.
const obj1 = { name: "Gadget" };
E.
const obj3 = Object.create({ name: "Gadget" });

Quiz

10/10
Which of the following code snippets correctly initializes an array, adds a new element to the end, and removes the first element?
Select the answer
1 correct answer
A.
let arr = [1, 2, 3];arr.unshift(4);arr.shift();
B.
let arr = [1, 2, 3];arr.push(4);arr.shift();
C.
let arr = [1, 2, 3];arr.pop();arr.push(4);
D.
let arr = [1, 2, 3];arr.push(4);arr.pop();
Looking for more questions?Buy now

JSA - Certified Associate JavaScript Programmer Practice test unlocks all online simulator questions

Thank you for choosing the free version of the JSA - Certified Associate JavaScript Programmer practice test! Further deepen your knowledge on JS Institute Simulator; by unlocking the full version of our JSA - Certified Associate JavaScript Programmer Simulator you will be able to take tests with over 190 constantly updated questions and easily pass your exam. 98% of people pass the exam in the first attempt after preparing with our 190 questions.

BUY NOW

What to expect from our JSA - Certified Associate JavaScript Programmer practice tests and how to prepare for any exam?

The JSA - Certified Associate JavaScript Programmer Simulator Practice Tests are part of the JS Institute Database and are the best way to prepare for any JSA - Certified Associate JavaScript Programmer exam. The JSA - Certified Associate JavaScript Programmer practice tests consist of 190 questions and are written by experts to help you and prepare you to pass the exam on the first attempt. The JSA - Certified Associate JavaScript Programmer database includes questions from previous and other exams, which means you will be able to practice simulating past and future questions. Preparation with JSA - Certified Associate JavaScript Programmer Simulator will also give you an idea of the time it will take to complete each section of the JSA - Certified Associate JavaScript Programmer practice test . It is important to note that the JSA - Certified Associate JavaScript Programmer Simulator does not replace the classic JSA - Certified Associate JavaScript Programmer study guides; however, the Simulator provides valuable insights into what to expect and how much work needs to be done to prepare for the JSA - Certified Associate JavaScript Programmer exam.

BUY NOW

JSA - Certified Associate JavaScript Programmer Practice test therefore represents an excellent tool to prepare for the actual exam together with our JS Institute practice test . Our JSA - Certified Associate JavaScript Programmer Simulator will help you assess your level of preparation and understand your strengths and weaknesses. Below you can read all the quizzes you will find in our JSA - Certified Associate JavaScript Programmer Simulator and how our unique JSA - Certified Associate JavaScript Programmer Database made up of real questions:

Info quiz:

  • Quiz name:JSA - Certified Associate JavaScript Programmer
  • Total number of questions:190
  • Number of questions for the test:50
  • Pass score:80%

You can prepare for the JSA - Certified Associate JavaScript Programmer exams with our mobile app. It is very easy to use and even works offline in case of network failure, with all the functions you need to study and practice with our JSA - Certified Associate JavaScript Programmer Simulator.

Use our Mobile App, available for both Android and iOS devices, with our JSA - Certified Associate JavaScript Programmer Simulator . You can use it anywhere and always remember that our mobile app is free and available on all stores.

Our Mobile App contains all JSA - Certified Associate JavaScript Programmer practice tests which consist of 190 questions and also provide study material to pass the final JSA - Certified Associate JavaScript Programmer exam with guaranteed success. Our JSA - Certified Associate JavaScript Programmer database contain hundreds of questions and JS Institute Tests related to JSA - Certified Associate JavaScript Programmer Exam. This way you can practice anywhere you want, even offline without the internet.

BUY NOW