//Min function
function min (a, b) {
if (a < b) return a;
else return b;
}
min (2,3)
//Iseven problem
function isEven (n) {
if (n == 1) return false;
if (n == 0) return true;
if (n < 0) return isEven (-n);
else return isEven (n - 2);
}
isEven(-62)
//Counting Beans
I didn’t know how to do this exercise so I’ve check the internet and I found this answers, that sincerely I don’t understant at all. Moreover, the second part of the exercise gives some kind of error.
Anyway, now checking the colleagues answers, I see things that I didn’t know as well like this “[i]” to refer or point a characther. I could’ve guess i supposed.
I know is not the right solution, but it is a solution. Keep calm and carry on! 
function countBs (x){
console.log((x.match(/B/g) || []).length);
}
countBs('Batman is not a Bad bboy')
function countAnyCh (x, y){
console.log(x.match(new RegExp( y, 'g')) || []).length;
}
countAnyCh ('Batman is not a Bad bboooy', 'o')
I don’t know why but when I copy-paste the solution when editing the post it works in the console. But when the post is published, it don’t… 
Do the rest of the code with correct format, see my post below.
ivo