Created
March 7, 2017 14:40
-
-
Save heckctor/821c0cad9e2cdae4afd778c979126b95 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/hapadux
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
//while | |
var contadorWhile = 1; | |
while(contadorWhile <= 20){ | |
console.log(contadorWhile); | |
contadorWhile++; | |
} | |
console.info('Termine el while'); | |
//do while | |
var contDoWhile = 10; | |
do{ | |
console.log(contDoWhile); | |
contDoWhile--; | |
}while(contDoWhile >= 1); | |
console.log('termine el do while'); | |
//for | |
for(var contFor = 1; contFor <= 50; contFor++){ | |
console.log(contFor); | |
} | |
console.log('termine el for'); | |
//switch | |
var planeta = 'tierra'; | |
switch(planeta){ | |
case 'sol': | |
console.log('el ' + planeta + ' quema'); | |
break; | |
case 'tierra': | |
console.log('Hay vida en la ' + planeta); | |
break; | |
case 'marte': | |
console.log('No hay vida en ' + planeta); | |
break; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">//while | |
var contadorWhile = 1; | |
while(contadorWhile <= 20){ | |
console.log(contadorWhile); | |
contadorWhile++; | |
} | |
console.info('Termine el while'); | |
//do while | |
var contDoWhile = 10; | |
do{ | |
console.log(contDoWhile); | |
contDoWhile--; | |
}while(contDoWhile >= 1); | |
console.log('termine el do while'); | |
//for | |
for(var contFor = 1; contFor <= 50; contFor++){ | |
console.log(contFor); | |
} | |
console.log('termine el for'); | |
//switch | |
var planeta = 'tierra'; | |
switch(planeta){ | |
case 'sol': | |
console.log('el ' + planeta + ' quema'); | |
break; | |
case 'tierra': | |
console.log('Hay vida en la ' + planeta); | |
break; | |
case 'marte': | |
console.log('No hay vida en ' + planeta); | |
break; | |
} | |
</script></body> | |
</html> |
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
//while | |
var contadorWhile = 1; | |
while(contadorWhile <= 20){ | |
console.log(contadorWhile); | |
contadorWhile++; | |
} | |
console.info('Termine el while'); | |
//do while | |
var contDoWhile = 10; | |
do{ | |
console.log(contDoWhile); | |
contDoWhile--; | |
}while(contDoWhile >= 1); | |
console.log('termine el do while'); | |
//for | |
for(var contFor = 1; contFor <= 50; contFor++){ | |
console.log(contFor); | |
} | |
console.log('termine el for'); | |
//switch | |
var planeta = 'tierra'; | |
switch(planeta){ | |
case 'sol': | |
console.log('el ' + planeta + ' quema'); | |
break; | |
case 'tierra': | |
console.log('Hay vida en la ' + planeta); | |
break; | |
case 'marte': | |
console.log('No hay vida en ' + planeta); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment