First pull request (1st class, lot of testing around)#659
Conversation
| let hacker2 = "Arnold" | ||
| console.log('The driver\'s name is ' + hacker1 + '.'); | ||
| console.log('The driver\'s name is ' + hacker2 + '.'); | ||
|
|
There was a problem hiding this comment.
You can use backticks and template strings here. Like The driver's name is ${hacker1}
| // hacker1 = hacker1.split(""); | ||
| // hacker1 = hacker1.reverse(); | ||
| // hacker1 = hacker1.join(""); | ||
|
|
There was a problem hiding this comment.
You can also use a for loop which read the string starting at the end. Like for( i = hacker1.length -1; i >=0; i++){console.log(hacker[i])}
|
|
||
| phraseToCheck ='radar' | ||
|
|
||
| // Iteration 3: Loops No newline at end of file |
There was a problem hiding this comment.
One way to check if something is a palindrome is to have a variable that will store the reversed version of the string. Then you compare the original string and reversed string to see if they're the same. If yes then it's a palindrome
|
This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This pull request is closed. Thank you. |
It looks like I made it. It took me a bit to upload it and master Terminal, but I believe I am getting there. I also have a couple of questions to discuss together :)
See you!