0% found this document useful (0 votes)
2 views4 pages

Lab Test 1

The document outlines the instructions for a lab test submission for COMP 3123, focusing on JavaScript (ES6) and Node.js. It includes guidelines for folder structure, Git repository setup, submission requirements, and specific questions related to ES6 features, promises, and file modules. The deadline for submission is October 3rd, 2024, at 8:00 PM, with strict penalties for late submissions.

Uploaded by

ammarkusow2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Lab Test 1

The document outlines the instructions for a lab test submission for COMP 3123, focusing on JavaScript (ES6) and Node.js. It includes guidelines for folder structure, Git repository setup, submission requirements, and specific questions related to ES6 features, promises, and file modules. The deadline for submission is October 3rd, 2024, at 8:00 PM, with strict penalties for late submissions.

Uploaded by

ammarkusow2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

COMP 3123 | Full stack Development – I

Test – 1 (6%)
Lecture Time: 06:00 PM to 08:00 PM

Instructions for a lab test submission involving JavaScript (ES6) and Node.js.
Here’s a quick checklist and guide for completing your lab test and submission:

Developer Note:
When working on your questions, please create separate folder for your
work. This way you won’t be putting all your code in the same file, which can
pollute the global namespace. In short, it will prevent you from overwriting your
own work and causing your code to compile incorrectly.
Organize your folder structure in this way (Use it as a reference)

1. Folder Structure and Code Organization


• Create a folder for your work to ensure you don’t pollute the global
namespace.
o Example: studentid_comp3123_labtest1/
• Create separate files/modules inside the folder if needed to avoid
overwriting code.
2. Documentation Resources
• JavaScript ES6 Documentation: MDN JavaScript Docs
• Node.js Documentation: Node.js Docs
3. Git Repository Setup
• Create a private Git repository on GitHub.
o Repository name: studentid_comp3123_labtest1 (replace studentid
with your actual ID).
o Push your code to this repo throughout the development process.
o Make the repository public after the submission deadline (Oct
3rd, 8:00 PM).
4. Submission Requirements
• ZIP of the project: Ensure you include all files in the ZIP (source code,
readme, etc.).
• GitHub repository link: Ensure the repo is public when you submit the
link.
• Screenshots: Take screenshots of the output from your code and include
them in the submission as a separate docx/pdf file.
5. Due Date
• Deadline: Thursday, 03th October 2024, 08:00 PM.
• Late submissions: ZERO percent will be awarded for late submissions,
so ensure everything is submitted on time!

Question 1: ES6 Features


● Create a script with a function named lowerCaseWords that takes a
mixed array as input.
The function will do the following.
o return a promise that is resolved or rejected
o filter the non-strings and lower case the remaining words

● Input

● Output

Question 2: Promises
● Given the script file callbacks.js, write a script that does the following:
o Create a method resolvedPromise that is similar to
delayedSuccess and resolves a message after a timeout of 500ms.
o Create a method rejectedPromise that is similar to
delayedException and rejects an error message after a timeout of
500ms.
o Call both promises separately and handle the resolved and reject
results and then output to the console
callbacks.js

• Output

Question 3: File Module


● Create a script that will do the following:

1. Remove Log files


o remove all the files from the Logs directory, if exists
o output the file names to delete
o remove the Logs directory

2. Create Log files


o create a Logs directory, if it does not exist
o change the current process to the new Logs directory
o create 10 log files and write some text into the file
o output the files names to console
o Hint: use the fs module and path module, and the process current
working directory to build directory path. It is acceptable, to have a
remove.js script and separate add.js script.

> Output

You might also like