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
/// SINTAXIS DE UN PROGRAMA EN DART | |
/// 1. Inicio del programa | |
/// 2. Intrucción 1; | |
/// 3. Intrucción 2; | |
/// 4. Intrucción 3; | |
/// ... | |
/// N. Fin del programa | |
/// Función "main" Marca el inicio y fin | |
/// de nuestro programa |
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
void main() { | |
/// OPERADORES | |
/// Operador Aritmeticos | |
/// + : suma | |
/// - : resta | |
/// * : multiplicación | |
/// / : división | |
/// Ejemplos |
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
void main() { | |
/// TIPOS DE VARIABLES | |
// +++++++++++++++++++++++++++ | |
/// variable (var): Se pueden reasignar. | |
/// var a = 50; | |
/// a = 80; | |
/// a = 0; | |
/// int b = 10; | |
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
void main() { | |
/// VARIABLES EN DART | |
/// Sintaxis1: tipo nombre = valor; | |
/// Sintaxis2: tipo nombre; | |
/// | |
/// FASE DE UNA VARIABLE | |
/// | |
/// 1. Declaración: | |
/// var peso; | |
/// 2. Inicialización: |
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
void main() { | |
/// LISTAS: | |
/// Una lista es una colección ordenada de elementos que | |
/// pueden ser del mismo tipo o de tipos diferentes. | |
/// Sintaxis: List nombre = []; | |
// final List<String> heroes = ['Superman', 'Spiderman', 'Flash']; | |
/// Imprimir: |
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
void main() { | |
/// MAPs | |
/// un mapa (map) es una colección de pares | |
/// clave-valor, donde cada clave es única y | |
/// está asociada a un valor. | |
/// Sintaxis: Map nombre = {key: value}; | |
/// final Map<int, String> dias = { | |
/// 1: 'Lunes', | |
/// 2: 'Martes', |
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
void main() { | |
/// EXPRESIONES CONDICIONALES | |
/// Las expresiones condicionales if y else | |
/// se utilizan para tomar decisiones en función | |
/// de si una condición dada es verdadera o falsa. | |
/// final bool estaSoleado = true; | |
///if (estaSoleado) { | |
/// print('Ponte gafas de sol'); |
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
void main() { | |
/// Bucle while: | |
/// El bucle while se utiliza para repetir | |
/// una serie de intrucciones mientras una | |
/// condición sea verdadera. | |
/// Sintaxis: | |
/// while(condicíon) { | |
/// -- Código que queremos ejecutar repetidamente. | |
/// } |
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
void main() { | |
/// Bucle FOR | |
/// El bucle for es útil cuando se | |
/// conoce de antemano el número de iteraciones | |
/// que se deben realizar. | |
/// Sintaxis: | |
/// for (inicialización; condición; actualización) { | |
/// -- Código a ejecutar en cada iteración -- | |
/// } |
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
/// FUNCIONES !!! | |
/// 1. Las funciones permiten encapsular | |
/// un conjunto de instrucciones | |
/// en un bloque reutilizable. | |
/// 2. Pueden aceptar parámetros de entrada. | |
/// 3. Pueden devolver un valor como resultado | |
/// (o simplemente ejecutar un conjunto de |
OlderNewer