File tree Expand file tree Collapse file tree 2 files changed +94
-0
lines changed
00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/javascript
01 - OPERADORES Y ESTRUCTURAS DE CONTROL/javascript Expand file tree Collapse file tree 2 files changed +94
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ /*Hola mouredev, empezando con los retos de prgramacion, espero no sea demasiado tarde
3
+ https://developer.mozilla.org/en-US/ */ //Diferente Comentario//
4
+
5
+ let a = 1
6
+ var b = 2
7
+ const c = b - a
8
+
9
+ let numero = 0
10
+ let string = "Hola"
11
+ let boleano = true
12
+ let sinDefinir = undefined
13
+ let nulo = null
14
+ let simbolo = Symbol ( 'descripcion' )
15
+ let numeroGrande = BigInt ( 909090909090909090909 )
16
+
17
+ console . log ( 'Hola JavaScript' )
Original file line number Diff line number Diff line change
1
+
2
+ let suma = 2 + 2
3
+ let resta = suma - 2
4
+ let multiplicacion = suma * 2
5
+ let division = multiplicacion / 2
6
+ let resto = division % 2
7
+ let incrementa = suma ++
8
+ let decrementa = resta --
9
+ let exponente = 2 ** 3
10
+
11
+ let asignacion = 2 = 2
12
+ let asignacionSuma = 2 + = 2
13
+ let asignacionResta = 2 - = 2
14
+ let asignacionMultiplicacion = 2 * = 2
15
+ let asignacionDivision = 2 / = 2
16
+ let asignacionResto = 2 % = 2
17
+ let asignacionExponente = 2 ** = 2
18
+
19
+ let igualdad = 2 == 2
20
+ let igualdadEstricta = 2 === 2
21
+ let desigualdad = 2 != 2
22
+ let desigualdadEstricta = 2 !== 2
23
+ let mayorQue = 2 > 2
24
+ let menorQue = 2 < 2
25
+ let menorQueOIgual = 2 <= 2
26
+ let mayorQueOIgual = 2 >= 2
27
+ let and = 2 && 2
28
+ let or = 2 || 2
29
+ let not = ! 2
30
+
31
+ if ( suma > 2 ) {
32
+ console . log ( "Es mayor" )
33
+ } else {
34
+ console . log ( "Es menor" ) }
35
+
36
+ switch ( suma ) {
37
+ case 1 : console . log ( "Es 1" ) ;
38
+ break ;
39
+ default : console . log ( "Es otro valor" )
40
+ }
41
+
42
+ for ( let i = 0 ; i < 10 ; i ++ ) {
43
+ console . log ( i )
44
+ }
45
+
46
+ while ( suma < 10 ) {
47
+ console . log ( suma )
48
+ suma ++
49
+ }
50
+
51
+ do {
52
+ console . log ( suma )
53
+ i ++
54
+ } while ( i < 5 )
55
+
56
+ // Programa para imprimir por consola
57
+
58
+ const printNumbers = ( num1 , num2 ) => {
59
+
60
+ while ( num1 < num2 ) {
61
+
62
+ if ( num1 === 16 || num1 % 3 === 0 ) {
63
+ num1 ++
64
+ continue
65
+ }
66
+
67
+ if ( num1 >= 10 && num1 <= 55 ) {
68
+ console . log ( num1 )
69
+ } else if ( num1 % 2 === 0 ) {
70
+ console . log ( num1 )
71
+ }
72
+ num1 ++
73
+ }
74
+ }
75
+
76
+ printNumbers ( 4 , 90 ) ;
77
+
You can’t perform that action at this time.
0 commit comments