Peusdkjansdaslkndlaskndalskn
Last active
October 17, 2023 03:00
-
-
Save leonus96/e5b04fd2101a0510fca1dfb1dfc63d0d to your computer and use it in GitHub Desktop.
variables
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() { | |
/// VARIABLES EN DART | |
/// Sintaxis1: tipo nombre = valor; | |
/// Sintaxis2: tipo nombre; | |
/// | |
/// FASE DE UNA VARIABLE | |
/// | |
/// 1. Declaración: | |
/// var peso; | |
/// 2. Inicialización: | |
/// peso = 70.6; | |
/// 2. Destrucción: | |
/// esto es automático :) | |
/// Ejemplo: | |
/// var peso; | |
/// peso = 50.8; | |
/// print(peso); | |
/// Ejemplo 2: | |
/// var peso = 50.8; | |
/// print(peso); | |
/// TIPOS DE DATOS | |
/// Numbers (int: 8, double:4.5) | |
/// Ejemplo: | |
/// int edad = 8; | |
/// double peso = 70.5; | |
/// Strings (String: 'Mi Texto') | |
/// String nombre = 'Joseph'; | |
/// print(nombre); | |
/// Booleans (bool: true / false) | |
/// bool esProfesor = true; | |
/// print(esProfesor); | |
/// Lists (List) | |
/// Sets (Set) | |
/// Maps (Map) | |
/// dinámico (dynamic) | |
/// dynamic valor = 22; | |
/// valor = 'veintidos'; | |
/// print(valor); | |
/// The value null (Null) | |
/// var valor; | |
/// valor = 'Algo'; | |
/// valor = null; | |
/// print(valor); | |
/// CONCATENACION/INTERPOLACION DE CADENAS: | |
/// String nombre = 'Joseph'; | |
/// int edad = 27; | |
/// print('La edad de $nombre es $edad'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment