# hw4-functions-scope #8

Open
wants to merge 6 commits into
from
+171 −0

## Conversation

Projects
None yet
2 participants

### pmmurray33 commented Dec 14, 2018

 No description provided.

### pmmurray33 added some commits Dec 14, 2018

``` Commit 1 - Verbal questions ```
``` 11e3b3f ```
``` Commit 3 - Digit Sum ```
``` 7fd965f ```
``` Pythagoras ```
``` f9ce263 ```
``` Commit 5 - Sum Array ```
``` 36b175c ```
``` Commit final - edits ```
``` 1581b90 ```
``` commit final-final edits ```
``` dbf8254 ```

### reuben reviewed Dec 20, 2018

 } checkPalindrome('Racecar');

#### reuben Dec 20, 2018 • edited

Contributor

not quite there -- but you're thinking around the right stuff.......
you've kind of overengineered it.
simplify it a bit.
• take in the string
• reverse it
• lowercase it
• if it's the same as the original palindrome, you'er done

### reuben reviewed Dec 20, 2018

 console.log(sum); return sum; }

Contributor

nice

### reuben reviewed Dec 20, 2018

 // //create equation // const sideC = Math.sqrt((sideA * sideA) + (sideB * sideB)); // return sideC; // }

Contributor

✔️

### reuben reviewed Dec 20, 2018

 sum = sum + parseInt(someNumberArray[i]); } return sum; }

Contributor

nice

### reuben reviewed Dec 20, 2018

 //console.log(Math.sqrt(num)); if (num === 2 || num === 3) { return false; }

#### reuben Dec 20, 2018

Contributor

whoops! 2 and 3 are both prime

### reuben reviewed Dec 20, 2018

 if (num === 2 || num === 3) { return false; } for (let i = 2; i < Math.sqrt(num); i++) {

#### reuben Dec 20, 2018

Contributor

you don't wanna iterate up to a decimal number, iteration requires integers

### reuben reviewed Dec 20, 2018

 } } console.log(printPrimes(97));

Contributor

solid