Skip to content

Instantly share code, notes, and snippets.

@anotherjung
Created May 29, 2015 19:40
Show Gist options
  • Save anotherjung/9cf670d68418a1983673 to your computer and use it in GitHub Desktop.
Save anotherjung/9cf670d68418a1983673 to your computer and use it in GitHub Desktop.
Basic Algorithms // source http://jsbin.com/juqoti
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Algorithms</title>
</head>
<body>
<script id="jsbin-javascript">
//(Odd Numbers) Write a program that would print all the odd numbers from 1 to 1000
for (var i=0; i<=1000; i++)
{
if (i%2 !==0)
console.log(i);
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">//(Odd Numbers) Write a program that would print all the odd numbers from 1 to 1000
for (var i=0; i<=1000; i++)
{
if (i%2 !==0)
console.log(i);
}</script></body>
</html>
//(Odd Numbers) Write a program that would print all the odd numbers from 1 to 1000
for (var i=0; i<=1000; i++)
{
if (i%2 !==0)
console.log(i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment