Number

Myna extensions to the JavaScript Number object

Summary
NumberMyna extensions to the JavaScript Number object
Functions
timesExecutes the supplied function parseInt(this) times.

Functions

times

Number.prototype.times = function(func)

Executes the supplied function parseInt(this) times.

Parameters

funca function to execute.  This function will be called with the current 0-based index

Example

(5).times(function(i){
$res.print(i + "<br>")
});
Number.prototype.times = function(func)
Executes the supplied function parseInt(this) times.