Build a Shape Manager - Step 41

Tell us what’s happening:

I’ve tried everything I can think of using both e.target and e.currentTarget, nothing so far has worked (I always get errors). How do I get the value of the event target?

Your code so far

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

/* file: styles.css */

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


function handleInput(e: Event) {
  let value = (e.currentTarget.getAttribute("value") as HTMLInputElement);

};

// 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 41

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

There are several issues.
e.currentTarget.getAttribute("value") is string or null,

But you are casting it to HTMLInputElement.
I think that you should cast e.target to HTMLInputElement.
And you can get value using .value property.
Then you can convert this value to a Number.

I think that this is requirement.