This repository was archived by the owner on Apr 18, 2025. It is now read-only.
Nw6|Aman-matoo/Module-Js1 Week:3 #189
Open
Ayman-matoo wants to merge 7 commits intoCodeYourFuture:mainfrom
Open
Nw6|Aman-matoo/Module-Js1 Week:3 #189Ayman-matoo wants to merge 7 commits intoCodeYourFuture:mainfrom
Ayman-matoo wants to merge 7 commits intoCodeYourFuture:mainfrom
Conversation
Ara225
suggested changes
Dec 9, 2023
Ara225
left a comment
There was a problem hiding this comment.
Some complaints and unfinished bits I'm afraid. Don't be discouraged but I would recommend having a look at varibles and functions again.
| We don't want the computer to run these 2 lines - how can we solve this problem? No newline at end of file | ||
| //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. | ||
| // to solve this problem to make this line as commit // |
Author
There was a problem hiding this comment.
yeah, this just has gone my mistake, I didn't want to be pushed.
| const age = 33; | ||
| let age = 33; | ||
| age = age + 1; | ||
| console.log(age); |
|
|
||
| console.log(`I was born in ${cityOfBirth}`); | ||
| const cityOfBirth = "Bolton"; | ||
| console.log(`I was born in ${cityOfBirth}`); |
| const cardNumber = 4533787178994213; | ||
| const last4Digits = cardNumber.slice(-4); | ||
| const last4Digits = String (cardNumber).slice(-4); | ||
| console.log(last4Digits); |
| const 12HourClockTime = "20:53"; | ||
| const 24hourClockTime = "08:53"; No newline at end of file | ||
| const HourClockTime24 = "20:53"; | ||
| const hourClockTime12 = "08:53"; |
| var y = denominator; | ||
|
|
||
| var outputVal = x % y; | ||
| if (outputVal > 0) { |
There was a problem hiding this comment.
We need a few more checks to meet the requirements - have a nother look if you have a mo
| if (a <= 0 || b <= 0 || c <= 0) { | ||
| return "false"; | ||
| } ; | ||
| if (a - b <= c || a + c <= b || b + c <= a) { |
| if (hours24 < 0 || hours24 > 23) { | ||
| return "Invalid hours in time string"; // check vaild in 24hours fromat | ||
| } else if (hours24 === 0) { | ||
| return "midnight"; |
There was a problem hiding this comment.
This wouldn't be an exspected output - if you are exspecting hours:minutes midnight would be an annoying output
| } else { | ||
| const hours12 = hours24 % 12; | ||
| const period = hours24 < 12 ? "AM" : "PM"; | ||
| return `${hours12 === 0 ? 12 : hours12}:${time.slice(3)} ${period}`; |
| letter === "a" || | ||
| letter === "e" || | ||
| letter === "i" || | ||
| // letter === "i" || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.