function method1() { try { a.b.c() } catch (err) { console.log(err) } finally { console.log('method1', 0) } console.log('method1', 1) console.log('method1', 2) } function method2() { try { a.b.c() } finally { console.log('method2', 5) } console.log('method2', 3) console.log('method2', 4) } // catch了才会走后面的代码 method1() // 没catch后面的代码不会走执行 method2()