--- id: 660f4b641290da41b2cf0dd9 title: Step 103 challengeType: 1 dashedName: step-103 --- # --description-- Just like addition, there are different operators you can use for subtraction. The subtraction assignment operator `-=` subtracts the given value from the current variable value, then assigns the result back to the variable. Replace your iterator statement with the correct statement using the subtraction assignment operator. # --hints-- Your `for` loop should not use `i = i - 1`. ```js assert.notMatch(__helpers.removeJSComments(code), /for\s*\(\s*let\s*i\s*=\s*count\s*;\s*i\s*>\s*0\s*;\s*i\s*=\s*i\s*-\s*1\s*\)\s*\{\s*rows\.push\(\s*padRow\s*\(\s*i\s*,\s*count\s*\)\s*\);/); ``` Your `for` loop should use subtraction assignment to reduce `i` by `1`. ```js assert.match(__helpers.removeJSComments(code), /for\s*\(\s*let\s*i\s*=\s*count\s*;\s*i\s*>\s*0\s*;\s*i\s*-=\s*1\s*\)\s*\{\s*rows\.push\(\s*padRow\s*\(\s*i\s*,\s*count\s*\)\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)); }*/ /*while (rows.length < count) { rows.push(padRow(rows.length + 1, count)); }*/ --fcc-editable-region-- for (let i = count; i > 0; i = i - 1) { rows.push(padRow(i, count)); } --fcc-editable-region-- let result = "" for (const row of rows) { result = result + "\n" + row; } console.log(result); ```