Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

London-10-shadi-fakhri-JavaScript-Core-1-Coursework-Week4 #223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shadi38
Copy link

@Shadi38 Shadi38 commented Mar 17, 2023

No description provided.

@@ -24,16 +44,30 @@ Write a function that:
- Removes any forward slashes (/) in the strings.
- Makes the strings all lowercase.
*/
function tidyUpString() {

function tidyUpString(arr) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job with this function. Just a minor comment, try to give more meaningful names to the variables and avoid using keywords like 'array' or 'string' as those can get confused with the type.

if (password.length < 5) {
return false;
}
if (!containsUppercaseLetter(password)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have multiple if statements that will do the same (return false;). How would you optimize this code?

@llamojha llamojha added the reviewed A mentor has reviewed this code label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
reviewed A mentor has reviewed this code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants