Search code examples
javascriptarc4random

How to use arc4random in JavaScript?


How do I use arc4random in JavaScript? I tried to use var randomNumber = (arc4random() % 83) + 1; but I got UncaughtReferenceError: arc4random is not defined. I am not sure which libs to include to use arc4random.


Solution

  • I do not believe it possible, given all research points to the fact that arc4random is not a js function, but one built in to objective-c, or ios. I'm beginning to believe you did little research into the matter. Even the tag wiki entry on SO says as much.