Build a Pyramid Generator - 2nd test not clear?

Tell us what’s happening:

I don’t understand how it is possible to check the 1, 3, 4 steps but not the 2 step one !

What is going on ?

Your code so far

function pyramid(char, rows, bool){
  let string = "";
  let space = " ";
  let breaker = "\n"
  let charNum = rows*2-1;
  if(bool === true){ 
    for(let i = 0; i<rows; i++){
      if(i !== rows){
        string += "\n"+(space.repeat(i)) +char.repeat(charNum-(i*2));
      }
    }
    string+= breaker
    return string;
  }

  if(bool === false){
    for(let i = rows; i>0; i--){
      if(i !== rows+1){
        string += "\n"+(space.repeat(i-1)) +char.repeat(charNum-((i-1)*2));
      }
    }
    string+= breaker
    return string;
  }
}

let result = pyramid("p",4,false);

console.log("Result :");
console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0

Challenge Information:

Build a Pyramid Generator - Build a Pyramid Generator

I am having the same issue withing the TitleCase converter (where steps 2 doesn’t work even tho I only pass one argument)

function titleCase(str){
  let result = "";
  let array = [];
  array = str.toLowerCase().split(" ");
  for(let word of array){
    result += word[0].toUpperCase()+word.slice(1, word.length)+" ";
  }
  result = result.trimEnd();
  return result;
}

let result = titleCase("MIOU miou MIou Miou");

console.log(result);

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.