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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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)