This repository was archived by the owner on Oct 26, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 453
Azad week 3 #1019
Open
azadaafo
wants to merge
11
commits into
CodeYourFuture:manchester3
Choose a base branch
from
azadaafo:Azad-week-3
base: manchester3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Azad week 3 #1019
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
86a85d2
oxygen and bush-berries exercises done
azadaafo 71998e6
coloniser exercise doen
azadaafo d85af8b
4-eligible-students done
azadaafo 3468bb8
5-journey-planner done
azadaafo a7ea06d
6-lane-names done
azadaafo 2501105
failed oxygen level exercise
azadaafo 2dedc1a
bush-berries task failed
azadaafo 41ee366
failed colonisers function
azadaafo 0b847a9
failed eligibility students test
azadaafo 09200ef
ha;f task solved
azadaafo 540a3fd
failed lane test
azadaafo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,18 +18,23 @@ | |
|
||
let array = [12, 73, 92, 45, 100, 14, 61]; | ||
|
||
array.some((value) => {return (value % 2 == 0)}); /* this will return true as SOME values | ||
array.some((value) => { return (value % 2 == 0) }); /* this will return true as SOME values | ||
will have a remainder of 0 i.e. they are even numbers*/ | ||
|
||
array.every((value) => {return (value % 2 == 0)}); /* this will return false as not ALL | ||
array.every((value) => { return (value % 2 == 0) }); /* this will return false as not ALL | ||
values will have a remainder of 0 i.e. there are some odd numbers in the array too*/ | ||
|
||
/* + + + + + + + + + + + + + + */ | ||
|
||
/* Now try to complete the exercise */ | ||
function bushChecker(safeBush) { | ||
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. Here you recognised here that you need input, but you haven't used it |
||
if (bushBerryColours1 === "pink") { | ||
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. Again, it is a comparison of an array and a string so it doesn't make sense logically. |
||
console.log("Bush is safe to eat from"); | ||
|
||
function bushChecker() { | ||
} else if (bushBerryColours2 === "pink") { | ||
console.log("Toxic! Leave bush alone!"); | ||
|
||
} | ||
} | ||
|
||
/* ======= TESTS - DO NOT MODIFY ===== */ | ||
|
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
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
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
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
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.
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.
oxygenLevels1
should have been an input parameter instead of using the global variable from outside.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.
oxygenLevels1 >= "19.5%"
comparison won't work becauseoxygenLevels1
is an array whereas "19.5%" is a string. Also, you have to parse number form the value of each array element and then compare as a number.