Skip to content

First pull request (1st class, lot of testing around)#659

Closed
teo-23 wants to merge 1 commit into
ironhack-labs:masterfrom
teo-23:master
Closed

First pull request (1st class, lot of testing around)#659
teo-23 wants to merge 1 commit into
ironhack-labs:masterfrom
teo-23:master

Conversation

@teo-23
Copy link
Copy Markdown

@teo-23 teo-23 commented Jan 10, 2020

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!

Comment thread js/index.js
let hacker2 = "Arnold"
console.log('The driver\'s name is ' + hacker1 + '.');
console.log('The driver\'s name is ' + hacker2 + '.');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use backticks and template strings here. Like The driver's name is ${hacker1}

Comment thread js/index.js
// hacker1 = hacker1.split("");
// hacker1 = hacker1.reverse();
// hacker1 = hacker1.join("");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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])}

Comment thread js/index.js

phraseToCheck ='radar'

// Iteration 3: Loops No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@stale
Copy link
Copy Markdown

stale Bot commented Feb 10, 2020

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.

@stale stale Bot added the stale label Feb 10, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Feb 12, 2020

This pull request is closed. Thank you.

@stale stale Bot closed this Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants