Skip to content

Fix for loop example code Scala/JS #3037

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

Merged
merged 1 commit into from
Jul 1, 2024
Merged

Fix for loop example code Scala/JS #3037

merged 1 commit into from
Jul 1, 2024

Conversation

LOsioChico
Copy link
Contributor

@LOsioChico LOsioChico commented Jul 1, 2024

What is wrong?

  • It's trying to redeclare the variable "i"

Fix

  • Change the variable name from "i" to "j" bc its the variable's name use below

Code on page:
image

Fix implementation:
image

Reference

Page Link: https://docs.scala-lang.org/scala3/book/scala-for-javascript-devs.html

@LOsioChico LOsioChico changed the title Fix example code Fix for loop example code Scala/JS Jul 1, 2024
@sjrd sjrd merged commit 10d3619 into scala:main Jul 1, 2024
1 check failed
@LOsioChico LOsioChico deleted the patch-1 branch July 1, 2024 10:33
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

Successfully merging this pull request may close these issues.

2 participants