venus
venus3y ago

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>
));
};
3 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Pavel | EvokeMe
Recursion
reactibot
reactibot3y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/902647189120118794/1044145934776406097

Did you find this page helpful?