• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 27 pages
Case

D280 ITSW 3151 JavaScript Programming - Final Assessment Review - WGU 2025 (With Solutions

Document preview thumbnail
Preview 3 out of 27 pages

D280 ITSW 3151 JavaScript Programming - Final Assessment Review - WGU 2025 (With SolutionsD280 ITSW 3151 JavaScript Programming - Final Assessment Review - WGU 2025 (With SolutionsD280 ITSW 3151 JavaScript Programming - Final Assessment Review - WGU 2025 (With Solutions

Content preview

D280 ITSW 3151 JavaScript
Programming

Finals Assessment Review

(Questions & Solutions)

2025




©2025

,Multiple Choice (MCQ)
1. Which of the following statements about JavaScript’s event loop is
correct?
A) The event loop executes synchronous code only.
B) The event loop continuously checks the call stack and task queue.
C) Promises are resolved immediately after they are created.
D) setTimeout always executes exactly after the specified time.

ANS: B
Rationale: The event loop monitors the call stack and the task queue,
processing items accordingly.

2. What is the result of the following code?

let obj = { a: 1 };
Object.freeze(obj);
obj.a = 2;
console.log(obj.a);
A) 1
B) 2
C) undefined
D) Error

ANS: A
Rationale: Object.freeze prevents changes to properties, so obj.a remains
1.

3. Which method creates a shallow copy of an object in JavaScript?
A) Object.freeze()
B) Object.assign()
C) Object.create()
D) Object.defineProperty()


©2025

, ANS: B
Rationale: Object.assign({}, obj) produces a shallow copy.

4. What will the following code log to the console?

let foo = async () => {
return 1;
};
foo().then(console.log);
A) undefined
B) Promise
C) 1
D) Error

ANS: C
Rationale: async functions return promises that resolve to their return
value, logging 1.

5. In JavaScript, which of the following is NOT a valid way to declare a
class property?
A) Using getter and setter methods
B) Using constructor assignment
C) Declaring properties directly outside the constructor
D) Using the "static" keyword for instance properties

ANS: D
Rationale: "static" is for static properties, not instance properties.

6. Which of the following about closures is TRUE?
A) Closures cannot access variables outside their local scope.
B) Closures allow inner functions to access outer function variables even
after the outer function has returned.
C) Closures are only created with arrow functions.
D) Closures are unique to JavaScript.


©2025

Document information

Uploaded on
May 28, 2025
Number of pages
27
Written in
2024/2025
Type
Case
Professor(s)
Unknown
Grade
Unknown
$16.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
emiliophd
3.4
(21)
Sold
191
Followers
46
Items
4725
Last sold
1 month ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions