Skip to content

Instantly share code, notes, and snippets.

@tlxue
Created July 26, 2011 18:06
Show Gist options
  • Save tlxue/1107395 to your computer and use it in GitHub Desktop.
Save tlxue/1107395 to your computer and use it in GitHub Desktop.
Prime Number
(function(n){var a=0,i,j,n=n+1||101;for(i=1;i<n;i++){for(j=1;j<=i;j++){if(i%j===0){a+=1}}if(a<3){console.log(i)}a=0;}})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment