Skip to content

Instantly share code, notes, and snippets.

@rodobarcaaa
Created October 10, 2023 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodobarcaaa/323e68b8f6581c45236dad77c9a4063a to your computer and use it in GitHub Desktop.
Save rodobarcaaa/323e68b8f6581c45236dad77c9a4063a to your computer and use it in GitHub Desktop.
Scala Hello World Var
object HelloWorldVar extends App {
// Declaramos una variable mutable vacía de tipo String
var value: String = ""
// Le asignamos un valor
value = "mundo"
// Imprimimos el valor y acá podemos ver como usar string interpolation
println(s"¡Hola, $value!") //¡Hola, mundo!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment