I have got a project, where need to make a check to undifined. How can i do it, because, if i try:
var sorted_arr = arrayOfParasites.sort((b, a) => a[1] - b[1]);
console.log(sorted_arr)
It takes an exception:
TypeError: Cannot read property 'sort' of undefined