console.log(rangeBetwee(7, 4));
function rangeBetwee(A,B)
{
var temp = new Set();
if(A>B)
{
for(var i=B ; i<=A ; i++)
{
temp.add(i);
}
}
else
{
for(var i=A ; i<=B ; i++)
{
temp.add(i);
}
}
return temp;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: