Skip to content

Instantly share code, notes, and snippets.

@massimilianop7
Created December 11, 2012 23:36
Show Gist options
  • Save massimilianop7/4263391 to your computer and use it in GitHub Desktop.
Save massimilianop7/4263391 to your computer and use it in GitHub Desktop.
Encontrar numero entre X y Y (version2)
function buscarDesdeHasta(desde,hasta,x)
{
var arr = new Array();
var longitud= hasta;
for (var i=0; i<=longitud; i+=1)
{
if (desde<=hasta)
{
arr[i]=desde;
desde++;
};
if (arr[i]==x)
{
return i;
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment