Generate a two-digit positive random number in JavaScript

function, javascript, random

Solution

For a random number between 10 and 99, use:

Math.floor(Math.random() * 90 + 10)

jsFiddle demo: http://jsfiddle.net/zjLY6/

Problem

How can I implement a simple function in JavaScript that generates a random positive number that consists of only two digits?

Original source

Related problems