venus – 07-03 Nov 21

I never knew that I can use the function inside its declaration. I would like to know more about it. Does it have some term in JS docs?
const childNodes = (child) => {
return child.map((childNode) => (
<div>
<div> {childNode.title} </div>
{/* ??? */}
{childNodes(childNode.children)}
</div>
));
};
const childNodes = (child) => {
return child.map((childNode) => (
<div>
<div> {childNode.title} </div>
{/* ??? */}
{childNodes(childNode.children)}
</div>
));
};
UU
Unknown User514d ago
E
EvokeMe514d ago
Recursion
UU
Unknown User514d ago