Achievements Round 1
Weight: 9%
Due:
Marking Rubric
Achievements will be marked differently than other Assignments in Brightspace:
- You will be graded for three 3-point mini-assignments (Achievements) in one Round for the first half of CPNT 262;
- Submissions for Achievements Round 1 will close Wednesday, October 19th @ 11:59pm;
- You can choose from any of the following Achievements for this Round;
Achievements
Submission Instructions:
- In Brightspace: submit a ZIP of relevant files to Round 1;
- As a comment: share links to make it easy for the instructor to quickly evaluate your work:
- GH repos, Pages, Projects (Beta), etc.
- Codepens, Figma, FigJam, etc.
- Double check the Achievement for specific instructions.
- If applicable, include a README containing the following;
- Achievement name and author;
- Attributions: Did anyone help you? Give credit to any classmates, articles, tutorials, etc that helped you complete this project.
- Include self-assessments, observations, research, etc under the heading “Code Journal” in your README.
- Submit Achievements as you finish them; your Instructor will try to keep up!
1. Plugin Away
3rd-party plugin/library implementation. Show that you’ve installed and implemented a 3rd party plugin or service from the following list:
- Suggestions for beginners:
- For more inspiration see (or a similar “Best Of” list):
Instructions
- Using the documentation provided by the library, follow the instructions and install the library.
- Suggestions for beginners:
- Avoid installation methods using
npm
oryarn
- Libraries with a CDN option are generally easier to install.
- Avoid installation methods using
- Suggestions for beginners:
- Create a simple demo that shows a working implementation.
2. Before and After
Show your knowledge of Javascript Number
, String
and Array
methods and properties.
Instructions
Create an empty
index.html
page;Choose a
Number
,String
orArray
achievement below;Complete the chosen achievement as either:
- embedded Javascript in a
<script>
element just before the</body>
tag, OR; - an external
client.js
(or similar) file linked in the<head>
with a deferred<script>
element.
- embedded Javascript in a
In your Javascript, log an initial
Number
,String
orArray
value (of your choice) to the console with the “Before” label as a first argument:const number = 4; console.log("Before", number);
Modify your initial value using at least three methods or properties from the relevant list below:
const squared = number ** 2; const remainder = number % Math.PI; console.log("After - squared", squared); console.log("After - remainder", remainder); console.log("After - as money", `$${number.toFixed(2)}`);
- You may log multiple “After” values or just one if you’re modifying the same value multiple times;
Zip, push and submit as normal to Achievements Round 1.
You may submit one, two, or three of the following achievements for Round 1 for 3 points each.
Number Achievement
Display or modify your chosen number
with at least three of the following:
- Increment or decrement a number using
++
/--
; - Convert a
number
to a string withNumber.toString()
; - Convert a
number
to exponential notation withNumber.toExponential()
; - Convert a
number
to a string with a given number of decimals withNumber.toFixed()
; - Convert a
number
to a given number of floating point decimals withNumber.toPrecision()
; - Convert a
number
to a language-sensitive string representation withNumber.toLocaleString()
- Convert a
number
orstring
to an integer withNumber.parseInt()
- Convert a
number
orstring
to a floating point number withNumber.parseFloat()
- Check if a
number
is an integer withNumber.isInteger()
- Check if a “number” is actually a
number
withNumber.isNaN()
- Check if a
number
is finite withNumber.isFinite()
-OR-
String Achievement
Display or modify your chosen string
with at least three of the following:
- Show the number of characters in your
string
withString.length
; - Show a sub-string of your
string
withString.substr()
orString.substring()
; - Show a sub-string of your
string
withString.slice()
; - Show the first character of your
string
; - Show the last character of your
string
; - Show the first
index
of a word that can be found in your string withString.indexOf()
; - Replace a word or phrase in your
string
with a new word or phrase usingString.replace()
orString.replaceAll()
; - Concatenate two strings with
String.concat()
; - Use
String.startsWith()
to show if yourstring
starts with a word of your choice; - Use
String.endsWith()
to show if yourstring
starts with a word of your choice; - Use
String.includes()
to show if a substring is present in yourstring
;
3. Proof of Work
Submit code that you have written based on:
- a course
- a tutorial
- documentation example
- etc.
Examples:
- Playlist of Javascript exercises by Coding Addict
Requirements:
- Courses shouldn’t have Hints that make it easy to submit code you haven’t written yourself;
- Tutorials shouldn’t provide examples of finished code;
BUT if Hints or sample code exist, you may submit an Achievement if you’ve proven that you’ve written the code yourself and/or changed, improved, refactored the code, such as:
- Do the same thing, but in a different way;
- You improve/refactored the code provided;
- You’ve customized the code in your own unique project/activity.
Include in your Submission:
- Before example of what’s provided by the resource (if necessary);
- After example of what you’ve done to refactor the code;
- Code comments describing what you changed and how/why;
- If necessary, add a submission comment on why you think this code should qualify as an Achievement.