const sample = <T>(items: T[]) => items[Math.floor(Math.random() * items.length)];
          Last active
          March 4, 2023 00:29 
        
      - 
      
- 
        Save joshwashywash/1b4d3bd8765ca42b0a94ca8d9e67ec9a to your computer and use it in GitHub Desktop. 
    takes a random sample from an array
  
        
        
        
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment