add type for each go and js code block

This commit is contained in:
Qi Jia
2021-08-26 22:25:12 -07:00
committed by GitHub
parent fad7fd35d1
commit 7c83141ce2

View File

@ -215,7 +215,7 @@ class TreeNode:
``` ```
Go Go
``` ```go
type TreeNode struct { type TreeNode struct {
Val int Val int
Left *TreeNode Left *TreeNode
@ -224,7 +224,7 @@ type TreeNode struct {
``` ```
JavaScript JavaScript
``` ```javascript
function TreeNode(val, left, right) { function TreeNode(val, left, right) {
this.val = (val===undefined ? 0 : val) this.val = (val===undefined ? 0 : val)
this.left = (left===undefined ? null : left) this.left = (left===undefined ? null : left)