-
-
Notifications
You must be signed in to change notification settings - Fork 197
London | May 2025 | Victoria Scott | Sprint 1 Coursework #684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
This is just an instruction for the first activity - but it is just for human consumption | ||
We don't want the computer to run these 2 lines - how can we solve this problem? | ||
We don't want the computer to run these 2 lines - how can we solve this problem? | ||
|
||
// To stop the computer from running those two lines, we can turn them into comments by adding // at the beginning of each line. This tells the computer to ignore the line because it is only meant for humans to read. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think you can implement the solution you provided? That is adding // at the beginning of each line? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
const 12HourClockTime = "20:53"; | ||
const 24hourClockTime = "08:53"; | ||
const 24hourClockTime = "08:53"; | ||
|
||
// There is an error in the variable name 12HourClockTime because JavaScript does not allow variable names to start with a number. | ||
// Corrected code: | ||
const twelveHourClockTime = "20:53"; | ||
const twentyFourHourClockTime = "08:53"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,18 @@ In this activity, we'll explore some additional concepts that you'll encounter i | |
Open the Chrome devtools Console, type in `console.log` and then hit enter | ||
|
||
What output do you get? | ||
ƒ log() { [native code] } | ||
|
||
Now enter just `console` in the Console, what output do you get back? | ||
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, ...} | ||
|
||
Try also entering `typeof console` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What output would you get back from entrying |
||
|
||
Answer the following questions: | ||
|
||
What does `console` store? | ||
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean? | ||
console stores a collection of functions (methods) used for displaying messages and debugging. | ||
What does the syntax `console.log` or `console.assert` mean? In particular, | ||
|
||
what does the `.` mean? console is the object. | ||
.log or .assert refers to a a function stored inside that object.The '.' is used to access a specific function (or property) inside the console object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think you could go further by writing some tests to confirm this?