From 0630954a147c3a759eed3669f46a7c6a5d04e8ee Mon Sep 17 00:00:00 2001 From: bendtherules Date: Thu, 15 Oct 2020 22:56:21 +0530 Subject: [PATCH] create-modify-element - Cleanup setAttribute section --- docs/create-modify-element.mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/create-modify-element.mdx b/docs/create-modify-element.mdx index 9c060ca..8ccb1ed 100644 --- a/docs/create-modify-element.mdx +++ b/docs/create-modify-element.mdx @@ -92,10 +92,12 @@ document.createElement("div") ### 2. `setAttribute()` -Every element has a `.setAttribute(name, value)` method, which can add/modify a attribute on the current element. +Every element has a `setAttribute` method - which sets a attribute on the current element. -`name` - the attribute name which should be added. Ex- `"type"`. -`value` - value of the attribute. Ex- `"text"`. +`setAttribute(name, value)` + +`name` - name of the attribute to add. Ex- "type". +`value` - value of the attribute. Ex- "text". ```js var ele = document.createElement("input")