This repository was archived by the owner on Jan 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 261
Glasgow Class 6 - Man Sang Sin - JavaScript Core 1 - Week 4 #226
Open
ManSangSin
wants to merge
14
commits into
CodeYourFuture:main
Choose a base branch
from
ManSangSin:main
base: main
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
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b377559
started 1-create-functions tasks
ManSangSin 514d90f
created format percentage function
ManSangSin 4498a80
refactored first5 function
ManSangSin d76f810
attempted oxygen-levels function
ManSangSin 17bfbaf
fixed typo
ManSangSin c47ab25
created bush berries function
ManSangSin 5eddcda
created get settlers function
ManSangSin cb66b7a
created get eligible students function
ManSangSin 27223bd
fixed typo
ManSangSin d484554
completed check code is there function
ManSangSin e96c7a2
completed get transport mode function
ManSangSin d354e25
completed is accessible by transport mode function
ManSangSin 89d3fbd
completed get location name function
ManSangSin 1401f79
completed journey planner function
ManSangSin 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
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.
Well done !!
Please be aware that sort() method sorts the elements of an array and returns the reference to the same array.
Which means it will sort inputArray. To avoid this, you can try to copy the inputArray as value then sort the new array.
sortedArr = [...inputArray]; //it will copy the value of inputArray and not a reference to it.
sortedArr.sort( );
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
Hope that helps. 😊
Keep up the good work 👌👌