// search for target in a tree using recursive function const treeIncludes = (target , root )=>{ if(root===null)return false; if(root.data===target) return true ; return treeIncludes(target , root.left ) || treeIncludes(target , root.right ); }