(function(){ window.OpenPopKa = true;}())

Write a recursive function to count the number of leaf nodes in the binary tree pointed at by "root". You must use the "isLeaf" method to check if the node is leaf or not. That is, do not check the value of the left and right children to see if they are null or not to decide if the node is a leaf.

[ editor.getValue() ]
if (guess[0] != initEditor) { console.log(guess[0]); window.codeValue = guess[0]; window.progexType= "BTRecurTutor"; window.summexName= "BTleafPROG"; } else { return ""; }

Make sure that you are answering the right question. There is an example in the text that counts all nodes in a tree. However, this exercise asks you to count all leaf nodes in a tree.