Skip to content

Commit

Permalink
#2 - Javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
cmejiajulian committed Jul 4, 2024
1 parent b698c33 commit a3436d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Roadmap/02 - FUNCIONES Y ALCANCE/javascript/cmejiajulian.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,19 @@ console.log( 'texto'.length);
let funTwo = (num1, num2) => {
let n1 = parseFloat(num1);
let n2 = parseFloat(num2);

let contador = 0
for (let i = 1; i <= 100; i++) {
if (i % 3 == 0 && i % 5 == 0) {
console.log(num1, num2);
console.log(num1+' '+ num2);
} else if (i % 3 == 0) {
console.log(num1);
} else if (i % 5 == 0) {
console.log(num2);
} else {
console.log(i);
contador++
}
}
return contador
}
funTwo('num1','num2');
console.log(funTwo('num1','num2'));

0 comments on commit a3436d5

Please sign in to comment.