Update JavaScript code to docs style (Chapter of Tree)

This commit is contained in:
justin
2022-12-13 21:44:14 +08:00
parent 2a375ebcbb
commit 07ca137e78
2 changed files with 10 additions and 10 deletions

View File

@ -8,9 +8,9 @@
* Definition for a binary tree node.
*/
function TreeNode(val, left, right) {
this.val = (val === undefined ? 0 : val) // 结点值
this.left = (left === undefined ? null : left) // 左子结点指针
this.right = (right === undefined ? null : right) // 右子结点指针
this.val = (val === undefined ? 0 : val); // 结点值
this.left = (left === undefined ? null : left); // 左子结点指针
this.right = (right === undefined ? null : right); // 右子结点指针
}
/**