typeError: cannot read properties of undefined (reading ‘join’)

  1. We should apply the join method only on Array. So before applying the join method, first we need to check that the output is coming in the form of array or not.
  2. if you are using any online code editor, check that you should use return instead of console.log. May be in the background they are applying the join method. So, for that they don’t want log reports. We need to return the output and the output should be in the form of Array to apply the Join method.

Leave a comment