From b40e5c7de22ed0c107d0f8560634c9991857ce72 Mon Sep 17 00:00:00 2001 From: Jin ZhongYuan Date: Wed, 8 Apr 2020 12:14:00 +0300 Subject: [PATCH] Update article.md a function body with plain `return` returns `undefined` rather than `null` --- 2-ui/2-events/03-event-delegation/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/2-events/03-event-delegation/article.md b/2-ui/2-events/03-event-delegation/article.md index 1fbb3f3bd6..8c22732fed 100644 --- a/2-ui/2-events/03-event-delegation/article.md +++ b/2-ui/2-events/03-event-delegation/article.md @@ -101,7 +101,7 @@ table.onclick = function(event) { Explanations: 1. The method `elem.closest(selector)` returns the nearest ancestor that matches the selector. In our case we look for `` on the way up from the source element. -2. If `event.target` is not inside any ``, then the call returns `null`, and we don't have to do anything. +2. If `event.target` is not inside any ``, then the call returns `undefined`, and we don't have to do anything. 3. In case of nested tables, `event.target` may be a `` lying outside of the current table. So we check if that's actually *our table's* ``. 4. And, if it's so, then highlight it.