Created
July 2, 2019 00:11
-
-
Save pajaro5/34d9ddc84746acffde618a345ce0c912 to your computer and use it in GitHub Desktop.
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>abajo</title> | |
</head> | |
<body> | |
</body> | |
<script> | |
var abajo = function(desde,hasta){ | |
if (desde === hasta) { | |
console.log(desde); | |
} else { | |
console.log(desde); | |
return abajo(desde-1,hasta); | |
} | |
} | |
abajo(100,1) //imprime los números del 100 al 1 | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment