From 366fe29e08a87bea8bfae40d771898a2cbdabb2d Mon Sep 17 00:00:00 2001 From: Shashvat Jain <80216472+plancky@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:25:24 +0530 Subject: [PATCH] Update article.md: Small correction The anonymous function passed to loadScript doesn't accept any arguments but the definition passes the callback the script tag which isn't necessary at all and may induce confusion. It makes perfect sense in successive examples, might have been a typo. --- 1-js/11-async/01-callbacks/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/11-async/01-callbacks/article.md b/1-js/11-async/01-callbacks/article.md index 57115a9098..5fa28e85b9 100644 --- a/1-js/11-async/01-callbacks/article.md +++ b/1-js/11-async/01-callbacks/article.md @@ -70,7 +70,7 @@ function loadScript(src, *!*callback*/!*) { script.src = src; *!* - script.onload = () => callback(script); + script.onload = () => callback(); */!* document.head.append(script);