FTWD Miami Neil Rampersad#93
Closed
neilxcode wants to merge 1 commit into
Closed
Conversation
sandrabosk
reviewed
Apr 3, 2018
| for (i = 0; i < hacker1.length; i++) | ||
| { | ||
| s += hacker1[i].toUpperCase() + " "; | ||
|
|
Contributor
There was a problem hiding this comment.
This will work although we can do the same using JS methods:
for (var i = 0; i < 1; i++) {
console.log(
hacker1
.split("")
.join(" ")
.toUpperCase()
);
}
| for (i = hacker2.length-1; i >= 0; i--) | ||
| { | ||
| t += hacker2[i] | ||
|
|
Contributor
There was a problem hiding this comment.
The same as above:
for (var i = 0; i < 1; i++) {
console.log(
hacker1
.split("")
.reverse(" ")
.join("")
);
}
Contributor
|
Amazing work! Thank you for submitting. |
Author
|
Awesome thanks !
________________________________
From: Aleksandra Boskovic <[email protected]>
Sent: Tuesday, April 3, 2018 9:35 AM
To: ironhack-labs/lab-javascript-basic-algorithms
Cc: neilxcode; Author
Subject: Re: [ironhack-labs/lab-javascript-basic-algorithms] FTWD Miami Neil Rampersad (#93)
@sandrabosk commented on this pull request.
________________________________
In starter-code/basic-algorithms.js<#93 (comment)>:
+else
+{
+ console.log("Yo, navigator got the longest name, it has " + hacker2.length + " characters.");
+}
+
+
+
+//Print all the characters of the driver's name, separated by a space and in capitals ie. "J O H N"
+
+var s = "";
+var t = "";
+
+for (i = 0; i < hacker1.length; i++)
+{
+ s += hacker1[i].toUpperCase() + " ";
+
This will work although we can do the same using JS methods:
for (var i = 0; i < 1; i++) {
console.log(
hacker1
.split("")
.join(" ")
.toUpperCase()
);
}
________________________________
In starter-code/basic-algorithms.js<#93 (comment)>:
+var t = "";
+
+for (i = 0; i < hacker1.length; i++)
+{
+ s += hacker1[i].toUpperCase() + " ";
+
+}
+console.log(s);
+
+
+//Print all the characters of the navigator's name, in reverse order. ie. "nhoJ"
+
+for (i = hacker2.length-1; i >= 0; i--)
+{
+ t += hacker2[i]
+
The same as above:
for (var i = 0; i < 1; i++) {
console.log(
hacker1
.split("")
.reverse(" ")
.join("")
);
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#93 (review)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Aa95LXPSUJxh42oYvYaOTzyUmQZ2zYvgks5tk4iugaJpZM4TD_rN>.
|
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.
Lab 1