Skip to content

Commit

Permalink
Merge pull request mouredev#4226 from MemoGV/main
Browse files Browse the repository at this point in the history
#00 - JavaScript y mouredev#1 - JavaScript
  • Loading branch information
Roswell468 authored Jun 11, 2024
2 parents 9d33ecf + 41d8094 commit 99217cc
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

/*Hola mouredev, empezando con los retos de prgramacion, espero no sea demasiado tarde
https://developer.mozilla.org/en-US/ */ //Diferente Comentario//

let a = 1
var b = 2
const c = b - a

let numero = 0
let string = "Hola"
let boleano = true
let sinDefinir = undefined
let nulo = null
let simbolo = Symbol('descripcion')
let numeroGrande = BigInt(909090909090909090909)

console.log('Hola JavaScript')
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

let suma = 2 + 2
let resta = suma -2
let multiplicacion = suma * 2
let division = multiplicacion / 2
let resto = division % 2
let incrementa = suma++
let decrementa = resta--
let exponente = 2 ** 3

let asignacion = 2 = 2
let asignacionSuma = 2 += 2
let asignacionResta = 2 -= 2
let asignacionMultiplicacion = 2 *= 2
let asignacionDivision = 2 /= 2
let asignacionResto = 2 %= 2
let asignacionExponente = 2 **= 2

let igualdad = 2 == 2
let igualdadEstricta = 2 === 2
let desigualdad = 2 != 2
let desigualdadEstricta = 2 !== 2
let mayorQue = 2 > 2
let menorQue = 2 < 2
let menorQueOIgual = 2 <= 2
let mayorQueOIgual = 2 >= 2
let and = 2 && 2
let or = 2 || 2
let not = !2

if(suma > 2){
console.log("Es mayor")
}else{
console.log("Es menor")}

switch(suma){
case 1: console.log("Es 1");
break;
default: console.log("Es otro valor")
}

for(let i = 0; i<10; i++){
console.log(i)
}

while(suma < 10){
console.log(suma)
suma++
}

do{
console.log(suma)
i++
}while(i<5)

// Programa para imprimir por consola

const printNumbers =(num1, num2)=>{

while(num1 < num2){

if(num1 === 16 || num1%3 === 0){
num1++
continue
}

if(num1 >= 10 && num1 <=55){
console.log(num1)
}else if(num1%2 === 0){
console.log(num1)
}
num1++
}
}

printNumbers(4, 90);

0 comments on commit 99217cc

Please sign in to comment.