-
-
Notifications
You must be signed in to change notification settings - Fork 195
London | May-2025 | Khilola_Rustamova | Module Structuring and Testing Data | Sprint 2 #631
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 11 commits
a4a9c1d
dcd3153
4af13eb
de53808
af03c01
3f2bd6b
f1b947f
d0529d8
681953a
7d8c6cf
5621c9c
587495b
853b42e
12485f9
676d26f
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 |
---|---|---|
|
@@ -3,18 +3,24 @@ | |
|
||
// this function should square any number but instead we're going to get an error | ||
|
||
// =============> write your prediction of the error here | ||
// =============> write your prediction of the error here | ||
|
||
function square(3) { | ||
return num * num; | ||
} | ||
|
||
// =============> write the error message here | ||
Function square(3) | ||
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 review again the error message? |
||
|
||
// =============> explain this error message here | ||
|
||
// 3 is not approprate parametr name. | ||
// num is not defined, | ||
// Finally, correct the code to fix the problem | ||
|
||
// =============> write your new code here | ||
function square(num) | ||
return num*num | ||
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. This code will look neater using proper syntax. E.g. space between Also, the function is missing curly braces |
||
|
||
console.log(square(3)); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,10 @@ | |
// You will need to come up with an appropriate name for the function | ||
// Use the MDN string documentation to help you find a solution | ||
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase | ||
|
||
|
||
const greating = "Hello there" | ||
console.log (greating.toUpperCase()); | ||
|
||
const heading = "lord of the rings" | ||
console.log(heading.toUpperCase()); | ||
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 move this implementation into a function? |
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. Could you review this again? The idea here is to write tests for various input data and edge cases, as well as to fix any bugs you find. The test cases are missing. |
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.
Most of the files are missing Predictions, where it's required for you to write your prediction first.