have HTML table. enter image description here

Need to take all elements from first column (ProtocolNo) and change it into link. When tried to use Array.from i get an error: error TS2339: Property 'form' does not exist on type 'ArrayConstructor'.

I fixed that with Polyfill from MDN. But now I don't know how to use forEach() to this Array :/

function changeToLink(){
    let tableCells = document.getElementsByTagName('td');
  interface ArrayConstructor {
  from(arrayLike: any, mapFn?, thisArg?): Array<any>;

  Array.from = function(arrayLike: any, mapFn?, thisArg?): Array<void> {
   // forEach() ?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.