Exceptions in asynchronous code in JavaScript

An exception thrown inside asynchronous code cannot be caught via try-catch:

javascripttry {
  setTimeout(function() {
    throw(new Error); // an exception will not be caught
  }, 3000);
} catch(error) {
  console.log(error);
}
Задание 1

Tell me what is the problem of the following code:

javascripttry {
  elem.addEventListener('click', function() {
    JSON.parse('some string');
  });
} catch() {
  console.log('invalid json');
}