const strLenght = (string) => {
const iter = (n) => {
if (string[n] === '') {
return n;
}
return iter(n++);
};
return iter(0);
};
const strLenght = (string) => {
const iter = (n) => {
if (string[n] === undefined) {
return n;
}
return iter(++n);
};
return iter(0);
};