1.- I went ahead and did something similar to the solutions on the forum because the sturtuire that i used was not accurate:
function min (a,b){
if (a>b) return a; else return b;
}
console.log (min (3,9));
2.- I wrote the following but realized that there was a statement before hand with the 0 is even etc:
function isEven (a,b) {
if (a,b %2); return (“It is an even number”);}
console.log (isEven(50,75));
3.- Copied it from @jgmusso:
var str = “B + + +sws BBB dqdBBB”;
var search = “B”;
alert(countUpper(str, search));
function countUpper(stri, lett) {
var count = 0;
for (var i = 0; i < stri.length; i++) {
if (stri[i] === lett) {
count += 1;
}
}
return count;
}