Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript try...catch in setTimeout

try {
    setTimeout(function() {
        // error in the code
    }, 3000);
} catch (e) {
  console.log( "won't work" );
}
 
PREVIOUS NEXT
Tagged: #JavaScript #setTimeout
ADD COMMENT
Topic
Name
5+9 =