Skip to content

Instantly share code, notes, and snippets.

@ivolivares
Created April 4, 2016 17:01
Show Gist options
  • Select an option

  • Save ivolivares/a1a617bfda02876cf1363c13e2368529 to your computer and use it in GitHub Desktop.

Select an option

Save ivolivares/a1a617bfda02876cf1363c13e2368529 to your computer and use it in GitHub Desktop.

Revisions

  1. Iván Olivares R created this gist Apr 4, 2016.
    9 changes: 9 additions & 0 deletions test_random_string.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    getRand = -> Math.random().toString(36).substring(7)
    equals = []

    for i in [0..2000]
    rand = getRand()
    console.log "Evaluating...#{rand}"
    equals.push rand if rand in equals

    console.log if equals.length then equals else 'Nothing equal'