Created
May 5, 2014 15:00
-
-
Save heathermiller/474a7787b23211da5fda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScalaJS.c.example_ScalaJSExample$.prototype.main__V = (function() { | |
var paragraph = ScalaJS.g["document"]["createElement"]("p"); | |
var l = ScalaJS.modules.scala_collection_immutable_List().apply__Lscala_collection_Seq__Lscala_collection_immutable_List(ScalaJS.modules.scala_Predef().wrapIntArray__AI__Lscala_collection_mutable_WrappedArray(ScalaJS.makeNativeArrayWrapper(ScalaJS.data.scala_Int.getArrayOf(), [1, 2, 3]))); | |
var l2 = ScalaJS.as.scala_collection_immutable_List(l.$$colon$plus__O__Lscala_collection_generic_CanBuildFrom__O(ScalaJS.bI(4), ScalaJS.modules.scala_collection_immutable_List().canBuildFrom__Lscala_collection_generic_CanBuildFrom())); | |
paragraph["innerHTML"] = (("<strong>Here's a list" + l2) + "</strong>"); | |
ScalaJS.g["document"]["getElementById"]("playground")["appendChild"](paragraph) | |
}); | |
Scala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): Unit = { | |
val paragraph = g.document.createElement("p") | |
val l: List[Int] = List(1,2,3) | |
val l2 = l :+ 4 | |
paragraph.innerHTML = "<strong>Here's a list " + l2 + "</strong>" | |
g.document.getElementById("playground").appendChild(paragraph) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment