+ 1

Someone should pls check my code countToTwenty = ( n = 1) => { if ( n == 21) { return}; Console.log(n) n++; countToTwenty (n); }

Counting using if

30th May 2022, 10:26 AM
Cool Ice
Cool Ice - avatar
3 odpowiedzi
+ 1
And what there is to check? the function isn't getting invoked. Don't write code in question title, write it in post Description if it's short. If it's long, save it as a code bit and share its link. https://www.sololearn.com/post/75089/?ref=app
30th May 2022, 10:42 AM
Ipang
+ 1
Cool Ice What is the issue here? You didn't call function. //Someone should pls check my code countToTwenty = ( n = 1) => { //alert (n) if ( n == 21) { return } console.log(n) n++; countToTwenty (n); } countToTwenty ()
30th May 2022, 3:46 PM
A͢J
A͢J - avatar
+ 1
Okay
30th May 2022, 9:06 PM
Cool Ice
Cool Ice - avatar