From ab9028492c5bb2b1a969543fee48d2c5098e6f1d Mon Sep 17 00:00:00 2001 From: xuwu Date: Tue, 9 Mar 2021 07:24:08 +0800 Subject: [PATCH] feat: update --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index e24bde4..f84384a 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,23 @@ ## 今日原题 +第二题:[以下代码输出什么,为什么?](https://github.com/KieSun/fucking-frontend/issues/2),这道题目是第一题的进阶版本,更有趣了。 + +```js +try { + let a = 0 + ;(async function() { + a += 1 + console.log('inner', a) + throw new Error('123') + // a() + })() + console.log('outer', a) +} catch(e) { + console.warn('Error', e) +} +``` + 第一题:[以下代码输出什么,为什么?](https://github.com/KieSun/fucking-frontend/issues/1)。 ```js