Skip to content
Advertisement

ws.write = (result.join(‘,’) + ‘n’); && TypeError: result.join is not a function …how i solve this type error

help to solve in this javascript problem. Give me clear documentation about (join).

JavaScript

}

Advertisement

Answer

Clear documentation for join

JavaScript

Not sure what compareTriplets is but based on the word compare I am assuming it returns a boolean. You are trying to join a boolean expression. If you want one string containing of A and B then put A and B into an array and then use join. But with so little information it is hard to understand what you are trying to accomplish.

Based on your code I am assuming A and B both are arrays. If you want to join the elements together do this. Also assuming result is a boolean.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement