hi Annie I am somehow novice with js .. but not in programming .. I used to get fb page with programming challenges puzzles .. but I am trying not to use fb.. mostly fb is a waste of time .. anyway I am from older school I prefer to use as less as functions calls.. and I enjoy problems solving .. wish you happy coding
str = 'covid';
console.log(str);
strv = revstr(str,0);
console.log(strv);
// this mostly solve all of the puzzles with slight modification ;)
// you dont need to use costly sub function in the same time you can reverse part if you like
// ex s = reverstr(str,3) = codiv
function revstr(str, idx)
{
if (idx == str.length)
return '';
else
return revstr(str, idx+1)+str[idx];
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
hi Annie I am somehow novice with js .. but not in programming .. I used to get fb page with programming challenges puzzles .. but I am trying not to use fb.. mostly fb is a waste of time .. anyway I am from older school I prefer to use as less as functions calls.. and I enjoy problems solving .. wish you happy coding
str = 'covid';
console.log(str);
strv = revstr(str,0);
console.log(strv);
// this mostly solve all of the puzzles with slight modification ;)
// you dont need to use costly sub function in the same time you can reverse part if you like
// ex s = reverstr(str,3) = codiv
function revstr(str, idx)
{
if (idx == str.length)
return '';
else
return revstr(str, idx+1)+str[idx];
}