From 8d2f4ecba71f13df4327d8e4445fc9fd81d21d3e Mon Sep 17 00:00:00 2001 From: bendtherules Date: Fri, 16 Oct 2020 02:16:12 +0530 Subject: [PATCH] create-modify-element - clarify .append() doc --- docs/create-modify-element.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/create-modify-element.mdx b/docs/create-modify-element.mdx index 951fd78..4714c1a 100644 --- a/docs/create-modify-element.mdx +++ b/docs/create-modify-element.mdx @@ -134,15 +134,15 @@ eleDiv.appendChild(eleH1) - There is a newer api called `.append()`, which is similar. + There is a newer api called .append(), which is similar. - ⭐️ `.append()` allows multiple child elements or string as argument. It creates Text node automatically if the input is a string. + ⭐️ .append() allows you to insert multiple child elements in a single call. It also allows string as input, which gets converted to Text node. ```js ele1.append(ele2, ele3, 'hello world') ``` - 💔 `.appendChild()` only allows a single element as input. + 💔 .appendChild() only allows inseting a single element at a time.