Samuel imafidon - #1
Open
osammy wants to merge 3 commits into
Open
Conversation
vebradev
reviewed
Aug 23, 2019
| const uni = []; | ||
|
|
||
| graduates | ||
| .forEach(element => element.university.match(/Uni/g) ? uni.push(element.university) : ""); |
There was a problem hiding this comment.
Fancy way to achieve this one! Not sure whether you wanted to push yourself, but try to research includes() method. Other than that - this is cool! 😄
vebradev
approved these changes
Aug 23, 2019
Owner
Author
|
Lol...I used includes at some point but to my shock it was failing, looking
back now I see why I actually did a test for 'uni' instead of 'Uni' so
includes kept failing.
Also, it turns out that includes is an es7 feature and only available in
the most up-to-date of browsers
…On Fri, 23 Aug 2019, 14:02 Justinas Vebra, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In challenges/objects-arrays.js
<#1 (comment)>
:
> console.log(contactInfo);
/* Request 3: Find out how many universities have the string "Uni" included in their name. Create a new array called uni that contains them all. Log the result. */
const uni = [];
+
+graduates
+.forEach(element => element.university.match(/Uni/g) ? uni.push(element.university) : "");
Fancy way to achieve this one! Not sure whether you wanted to push
yourself, but try to research includes() method. Other than that - this
is cool! 😄
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AGEWHK4O56ONEKFZWPEI5SLQF7NVBA5CNFSM4IO5TEP2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCQPKYA#pullrequestreview-278984032>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGEWHK76DN7OBXJBEFC7CHTQF7NVBANCNFSM4IO5TEPQ>
.
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.