-
-
Notifications
You must be signed in to change notification settings - Fork 195
Sheffield | May-2025 | Declan Williams| Sprint-1 #496
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
8802a06
8814459
91d5acd
883d6a9
4aa3c34
d9a3827
7949765
c2f8d78
7860039
d417309
e272375
fe71af2
7ea559b
cb969db
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,3 @@ | ||
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? | ||
/* 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 solved this problem by using a comment so the computer ignores the lines. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
// trying to create an age variable and then reassign the value by 1 | ||
|
||
const age = 33; | ||
let age = 33; | ||
age = age + 1; | ||
console.log(age); | ||
|
||
//this error was solved by using the let keyword to declare the age variable, allowing it to be reassigned later instead of using const, which would have caused an error if we tried to reassign it. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
// Currently trying to print the string "I was born in Bolton" but it isn't working... | ||
// what's the error ? | ||
|
||
console.log(`I was born in ${cityOfBirth}`); | ||
// console.log(`I was born in ${cityOfBirth}`); | ||
// const cityOfBirth = "Bolton"; | ||
|
||
// The error is that `cityOfBirth` is being used before it has been declared. | ||
// To fix this, we needed to declare `cityOfBirth` before using it in the console.log statement. | ||
|
||
// Here's the corrected code: | ||
const cityOfBirth = "Bolton"; | ||
console.log(`I was born in ${cityOfBirth}`); |
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. Can you explain your choice for the changes you made in this file? 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. I made these changes because you can't start a variable with a number and it throws an error. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const 12HourClockTime = "20:53"; | ||
const 24hourClockTime = "08:53"; | ||
const twelveHourClockTime = "08:53 am"; | ||
const twentyFourHourClockTime = "20:53"; |
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. a) You have identified the lines where there are function calls. Are you sure there are only 3? How do you decide when something is a function call? 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. a) i did believe there was only 3 function calls as i was overlooking the function "number" and just thinking of the .replaceAll functions on lines 4 and 5 after going over it with the teacher during workshop. so the total of functions being called is 5 in total (on lines 4 and 5 there is two function calls in each line and then the last function being called is the console.log on line 10) |
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. a) How is the program calculating the number of hours in a film? |
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.
Instead of changing the pull request template text file, do you know where it would be better to place your PR comments so they show in the github UI?
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.
when i send in the pull request i can then edit it there before posting.