From 65288f12ee7ed2adf7a771764d71a7daa71a1bf8 Mon Sep 17 00:00:00 2001 From: Tamirrr <43725711+tamir61@users.noreply.github.com> Date: Thu, 9 May 2024 12:28:51 +0300 Subject: [PATCH 1/2] Update scala-for-javascript-devs.md Fix Javascript For loops comparison with Scala example --- _overviews/scala3-book/scala-for-javascript-devs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_overviews/scala3-book/scala-for-javascript-devs.md b/_overviews/scala3-book/scala-for-javascript-devs.md index 658b2a6539..a087d02f88 100644 --- a/_overviews/scala3-book/scala-for-javascript-devs.md +++ b/_overviews/scala3-book/scala-for-javascript-devs.md @@ -938,10 +938,10 @@ val nums = List(1, 2, 3)
// preferred
-
for i <- ints do println(i)
+
for i <- nums do println(i)
// also available
-
for (i <- ints) println(i)
+ // preferred
-
for i <- ints do
+
for i <- nums do
val i = i * 2
println(j)