Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

03.3.1 切片基本操作中示例代码有误 #159

Closed
myrat92 opened this issue Mar 3, 2021 · 0 comments
Closed

03.3.1 切片基本操作中示例代码有误 #159

myrat92 opened this issue Mar 3, 2021 · 0 comments

Comments

@myrat92
Copy link

myrat92 commented Mar 3, 2021

使用下面的代码遍历切片中的元素:
for i :=0; i < len(integer); i++ {
fmt.Println(i)
}

代码中应该为fmt.Println(integer[i])

同时代码的md格式用

for i :=0; i < len(integer); i++ {
    fmt.Println(integer[i])
}

是不是更易于阅读。

@hantmac hantmac closed this as completed Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants