From 54d9818bc052eae3d2b52b25f674609b5daa527f Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 14 Oct 2019 06:34:30 +0800 Subject: [PATCH] correct typo --- _posts/2019-10-14-forcing-javascript-dom-types.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2019-10-14-forcing-javascript-dom-types.md b/_posts/2019-10-14-forcing-javascript-dom-types.md index 97df0e5..fd9d2b9 100644 --- a/_posts/2019-10-14-forcing-javascript-dom-types.md +++ b/_posts/2019-10-14-forcing-javascript-dom-types.md @@ -31,9 +31,9 @@ before you assign it... x = document.getElementById('table-id') // -> always returns HTMLELement ``` -If you go straight to doing `document.getElementById` the variable will have the generic type `HTMLElement`. +If you go straight to doing `var x = document.getElementById('table-id')` the variable will have the generic type `HTMLElement`. -Important hint: the string parameter for `createElement` (`'table'` in our example above) will determine the type/interface that the variable `x` will use. +Important hint: the string parameter for `document.createElement()` (which is `'table'` in our example above) will determine the type/interface that the variable `x` will use. ## Uh, okay. But, uhm, why... woud I want to do that?