Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="try-catch" />
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
try {
    var a = 4;
    a = b + 2;
    console.log("Después del error");
} catch(err) {
    console.error("Error en try/catch " +  err.message);
} finally {
    console.log("Pase lo que pase, llegamos al finally");
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
aitormedran0pro
0viewers