Created with <3 with dartpad.dev.
Created
April 26, 2023 22:35
-
-
Save moifeer/375573329f99815cba0c76e4b23c5713 to your computer and use it in GitHub Desktop.
Prueba 2 DART: Pokemon
This file contains hidden or 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
| void main() { | |
| final String pokemon = 'ditto'; | |
| //int variable entera | |
| int hp = 5; | |
| print ('${hp * 2}, ${hp / 2}'); | |
| //triple comilla guarda la tabulación | |
| print( """ | |
| Hola | |
| ¿Qué | |
| tal | |
| te | |
| encuentras? | |
| $pokemon | |
| $hp | |
| """); | |
| final bool vivit = true; | |
| //variables booleanas | |
| //evitar que las variables sean nulas, hace que se estropee la app, si a una variable no se le da un valor esta es nula | |
| //cuidado con la siguiente línea porque declara la variable es nula | |
| //String urbs = null; | |
| //si no sabemos si en algún momento la app va a tener un valor nulo añadimos el símbolo ? | |
| String? urbs = null; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment