Build a Shape Manager - Step 34

Tell us what’s happening:

Not sure what’s wrong with this, I just know it’s failing. Can’t really test it because it never asks for inputs in the Preview. As far as I can tell, my code for triangle is the same as my code for rectangle, but rectangle passes and triangle doesn’t.

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: index.ts */
// User Editable Region

  } else if (shape == "rectangle") {
    result = calculateArea({
      type: "rectangle",
      width: Number(propertyInputs.width.value),
      height: Number(propertyInputs.height.value),
    });
  } else if (shape == "triangle") {
    result = calculateArea({
      type: "triangle",
      base: Number(propertyInputs.base.value),
      height: Number(propertyInputs.height.value),
    });
  }
  

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36

Challenge Information:

Build a Shape Manager - Step 34

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-shape-manager/6964e083368e3e6e90e8cefc.md at main · freeCodeCamp/freeCodeCamp · GitHub

It’s not propertyInputs.height, it’s propertyInputs.triangleHeight.
You need to change to triangleHeight.