add type for each go and js code block
This commit is contained in:
parent
fad7fd35d1
commit
7c83141ce2
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue