Skip to content

Commit de464a5

Browse files
fixing bug
1 parent 7e4c8d7 commit de464a5

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,9 +1440,9 @@ function makesTen(a, b){
14401440
//Write Your solution Here
14411441
};
14421442

1443-
console.log(frames(1, 1)); //60
1444-
console.log(frames(10, 1)); //600
1445-
console.log(frames(10, 25)); //15000
1443+
console.log(makesTen(1, 1)); //60
1444+
console.log(makesTen(10, 1)); //600
1445+
console.log(makesTen(10, 25)); //15000
14461446
```
14471447

14481448
<details><summary style="cursor:pointer">Solution</summary>
@@ -2121,3 +2121,33 @@ const highestDigit = (number) => {
21212121
21222122
---
21232123
**[⬆ Back to Top](#header)**
2124+
2125+
2126+
2127+
##### 58. Create a function that takes a number as an argument and returns the highest digit in that number.
2128+
2129+
2130+
```js
2131+
function highestDigit(number){
2132+
//Write Your solution Here
2133+
};
2134+
2135+
2136+
console.log(highestDigit(3456)); //6
2137+
console.log(highestDigit(21098)); //9
2138+
console.log(highestDigit(56123)); //6
2139+
```
2140+
2141+
<details><summary style="cursor:pointer">Solution</summary>
2142+
2143+
```js
2144+
const highestDigit = (number) => {
2145+
let arr = (number.toString().split(''))
2146+
return Math.max(...arr)
2147+
}
2148+
```
2149+
2150+
</details>
2151+
2152+
---
2153+
**[⬆ Back to Top](#header)**

0 commit comments

Comments
 (0)