--- id: 660f415b76859a2736771607 title: Step 78 challengeType: 1 dashedName: step-78 --- # --description-- Your pyramid has disappeared again. That's okay - that is to be expected. Before you create your new loop, you need to learn about `if` statements. An `if` statement allows you to run a block of code only when a condition is met. They use the following syntax: ```js if (condition) { logic } ``` Create an `if` statement with the boolean `true` as the condition. In the body, print the string `"Condition is true"`. # --hints-- You should create an `if` statement. ```js assert.match(__helpers.removeJSComments(code), /if/); ``` Your `if` statement should have `true` as the condition. ```js assert.match(__helpers.removeJSComments(code), /if\s*\(\s*true\s*\)/); ``` Your `if` body should log `"Condition is true"`. ```js assert.match(__helpers.removeJSComments(code), /if\s*\(\s*true\s*\)\s*\{\s*console\.log\(\s*("|')Condition is true\1\s*\);?/); ``` # --seed-- ## --seed-contents-- ```js const character = "#"; const count = 8; const rows = []; function padRow(rowNumber, rowCount) { return " ".repeat(rowCount - rowNumber) + character.repeat(2 * rowNumber - 1) + " ".repeat(rowCount - rowNumber); } // TODO: use a different type of loop /*for (let i = 1; i <= count; i++) { rows.push(padRow(i, count)); }*/ --fcc-editable-region-- --fcc-editable-region-- let result = "" for (const row of rows) { result = result + "\n" + row; } console.log(result); ```