Skip to content

Instantly share code, notes, and snippets.

@pajaro5
Created July 2, 2019 00:11
Show Gist options
  • Save pajaro5/34d9ddc84746acffde618a345ce0c912 to your computer and use it in GitHub Desktop.
Save pajaro5/34d9ddc84746acffde618a345ce0c912 to your computer and use it in GitHub Desktop.
<!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