File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ // 1. using destructuring, create a constant named
2
+ // p, which is a function that will create paragraph tags
3
+ // Remember, you'll need to use the "tags" namespace
4
+ // to destructure from
5
+
6
+ const { p } = tags
7
+
8
+ // 2. create a constant named myParagraph by using the
9
+ // p function you coded in step 1. The paragraph should
10
+ // contain a sentence of your choosing.
11
+
12
+ const myParagraph = p ( 'Lorem ipsum.' )
13
+
14
+ // 3. create a constant named node, that references
15
+ // the dom node where the id is 'app'.
16
+
17
+ const node = document . getElementById ( 'app' )
18
+
19
+ // 4. add your 'myParagraph' to the dom node you
20
+ // coded in step 3
21
+
22
+ node . appendChild ( myParagraph )
23
+
24
+
25
+ // HINTS / HELP
26
+ // If you need help, you can read the following docs:
27
+ // hyperscript-helpers: https://github.com/ohanhi/hyperscript-helpers
28
+ // destructuring: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring
29
+ // reference dom node: https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById
30
+ // adding html in code: https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild
31
+ // you can find my solution at: https://jsbin.com/najisaw/1/edit?js,output
You can’t perform that action at this time.
0 commit comments