3 ms·
All the HTML functions are variadic, so you can write section({}, h1({}, 'text'), article({}, 'text'), footer({}, 'text') ) in
by SahAssar 6y ago
All the HTML functions are variadic, so you can write
section({},
h1({}, 'text'),
article({}, 'text'),
footer({}, 'text')
)
instead of
section({}, [
h1({}, 'text'),
article({}, 'text'),
footer({}, 'text')
])
It's a choice, but I think without it you would have a lot more array openings/closings, and they would be more spread out instead of the empty objects, which are kept in the same place.
- abraxas 6y agoYour answer makes a lot of sense. I think you've made the right compromise.