I need to remove non numeric characters in javascript

I went to Stack Overflow and used the code but it said “input.replace() is not a function”

function simonizfixit(input) {
  input.replace(/\D/g,'');
}
1 Like