CPNT-262 Achievement 2 - Before and After
- Due: Friday, Feb 11 @ 11:59pm
- Weight: 5% of the final mark
Learning Outcomes
This achievement will be marked out of 5 points where you will:
- 1 point: Declare a variable for each of the following data types with
const
orlet
and assign them values of your choice. - 2 points: Print a variable in two distinct ways for each of the following value types:
String
Number
Boolean
Array
- 1 point: Add a label to a console message using multiple
console.log
arguments. - 1 point: Document this activity in a Code Journal section of the project README (see last step in the Instructions).
Instructions
Copy/download/clone these starter files into your workspace. In client.js
:
- Declare a variable with a name of your choice.
- Assign this variable a value of your choice.
- Suggestions for beginners:
String
: Your name?Number
: Your age?Boolean
: Do you like anime?
- Suggestions for beginners:
- Print the variable (Before) with
console.log
. - Print the the variable again (After), but changed in some way, such as:
- concatenate a
String
using template literals - increment a
Number
with the increment operator (++
) - Reverse a Boolean value with the logical NOT (
!
) operator - Output the number of items in an array with
Array.length
- Ask a classmate/facilitator for any other suggestions.
- concatenate a
- Include a
README.md
file with the following information:- Your name, course and assignment title;
- Attributions: Did anyone help you? Give credit to any classmates, articles, tutorials, etc that helped you complete this project.
- Code Journal: Include self-assessments, observations, research, etc under the heading "Code Journal".
Submission
- Create a GitHub repo of your project;
- Download a ZIP of the project;
- In Brightspace, submit your ZIP and include the following as a comment in your submission:
- a link to your GitHub repo;
- a link to the GitHub Pages site;
Partial Example Submission
Here's a redacted example to get you started: