• 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 4 out of 40 pages
Exam (elaborations)

(WGU D280) ITSW 3151 JavaScript Programming Final Assessment ( Qns & Ans) 2025.p

Document preview thumbnail
Preview 4 out of 40 pages

(WGU D280) ITSW 3151 JavaScript Programming Final Assessment ( Qns & Ans) 2025.p(WGU D280) ITSW 3151 JavaScript Programming Final Assessment ( Qns & Ans) 2025.p(WGU D280) ITSW 3151 JavaScript Programming Final Assessment ( Qns & Ans) 2025.p

Content preview

D280 ITSW 3151

JavaScript Programming

Final Assessment (Qns & Ans)

2025
General Instructions

1. Read All Questions Carefully: Make sure you understand each question.
2. Time Management: You have a specific amount of time to complete the exam.
Keep an eye on the clock and pace yourself.
3. Allowed Materials: Only use materials that are explicitly allowed. Unauthorized
materials can lead to disqualification.
4. ANS Format: Follow the required format for your ANS. For example, multiple-
choice questions might need you to select the best ANS, while essay questions
require detailed responses.
5. Academic Integrity: Adhere to the university's honor code. Any form of cheating or
plagiarism is strictly prohibited.
6. Technical Requirements: Ensure your computer and internet connection are
stable. For online exams, you might need a webcam and microphone for proctoring
purposes.
7. Submission: Submit your ANS before the time expires. Late submissions might
not be accepted.




©2024/2025

,1. What method would you use to create a promise in
JavaScript?
- A) `Promise.create()`
- B) `Promise.resolve()`
- C) `new Promise()`
- D) `Promise.then()`
- Correct ANS: C) `new Promise()`
- Rationale: A promise is created using the `new Promise()`
constructor, which takes a function as an argument.


2. Which of the following is true about closures in JavaScript?
- A) They can only access global variables.
- B) They can access outer function variables even after the
outer function has executed.
- C) They are only created in global function scopes.
- D) They cannot modify outer variables.
- Correct ANS: B) They can access outer function variables
even after the outer function has executed.
- Rationale: Closures maintain a reference to their lexical
scope, allowing them to access outer variables post-execution.
©2024/2025

,3. What will be the output of the following code?
```javascript
console.log(typeof null);
```
- A) "undefined"
- B) "null"
- C) "object"
- D) "string"
- Correct ANS: C) "object"
- Rationale: In JavaScript, `typeof null` returns "object,"
which is widely considered a quirk of the language.


4. Which JavaScript method is used to convert a JSON string
into a JavaScript object?
- A) `JSON.stringify()`
- B) `JSON.parse()`
- C) `JSON.convert()`
- D) `Object.fromJson()`
- Correct ANS: B) `JSON.parse()`


©2024/2025

, - Rationale: `JSON.parse()` is the method that converts a
JSON string into a corresponding JavaScript object.


5. What type of function is a 'generator' function in JavaScript?
- A) A synchronous function
- B) A callback function
- C) A function that can be paused and resumed
- D) An arrow function
- Correct ANS: C) A function that can be paused and
resumed
- Rationale: Generator functions can pause execution
(`yield`) and are resumed later, making them unique in managing
state.


Fill-in-the-Blank Questions


6. JavaScript uses ______________ for prototypal inheritance.
- Correct ANS: prototypes
- Rationale: JavaScript employs prototypes for inheritance,
allowing objects to inherit properties and methods from other
objects.



©2024/2025

Document information

Uploaded on
December 11, 2024
Number of pages
40
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown
$18.39

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