Merge pull request #671 from jackeyjia/patch-20

add type for each go and js code block
This commit is contained in:
程序员Carl
2021-08-29 09:27:39 +08:00
committed by GitHub

View File

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