Skip to content

Instantly share code, notes, and snippets.

View lihaoyi's full-sized avatar

Li Haoyi lihaoyi

View GitHub Profile
object ScalaJSExample extends js.JSApp{
def main() = {
val xs = Seq(1, 2, 3)
println(xs.toString)
val ys = Seq(4, 5, 6)
println(ys.toString)
val zs = for{
x <- xs
y <- ys
} yield x * y
@JSExport
object ScalaJSExample{
@JSExport
def main(args: Array[String]): Unit = {
val xs = Seq(1, 2, 3)
println(xs)
val ys = Seq(4, 5, 6)
println(ys)
val zs = for{
x <- xs