Show previous content Or we could simply return when there is no node at all. RUN CODERESETJAVASCRIPTCPPCSHARPGOJAVAJAVASCRIPTPYTHONRUBYPHPxxxxxxxxxx 1if (!node) {2 // if parent returned twice here (left/right), it was a leaf3 return;4}OUTPUTWrap:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment Show following content