Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Determines if current second is an odd or even number. Useful for boolean 'random' for A/B testing.
- */
- if (Math.floor(new Date().getTime() / 1000) % 2 == 0) {
- console.log('even')
- } else {
- console.log('odd')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement