Skip to content

Instantly share code, notes, and snippets.

@jasdeepkhalsa
Created July 17, 2013 14:40
Show Gist options
  • Select an option

  • Save jasdeepkhalsa/6021196 to your computer and use it in GitHub Desktop.

Select an option

Save jasdeepkhalsa/6021196 to your computer and use it in GitHub Desktop.
Simple 80/20 Split Testing in JavaScript
var rand = Math.floor((Math.random()*10)+1);
if(rand >= 3)
{
a_80();
}
else
{
b_20();
}
function a_80(){
// Do something
}
function b_20(){
// Do something
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment