Skip to content

Instantly share code, notes, and snippets.

@WesleySmits
Created October 16, 2021 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WesleySmits/f3b9c9c1ea828f66b734193ef8726097 to your computer and use it in GitHub Desktop.
Save WesleySmits/f3b9c9c1ea828f66b734193ef8726097 to your computer and use it in GitHub Desktop.
Simple web calculator: Handle button click method
#handleButtonClick(event: Event): void {
const target = event.target as HTMLButtonElement;
if (target === null) {
return;
}
const { value } = target;
const userValue = target.innerText;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment