A
A
Alexander Fadeev2012-03-01 05:47:30
JavaScript
Alexander Fadeev, 2012-03-01 05:47:30

mootools - scandals, intrigues, investigations

Maybe I'm stupid, maybe I'm swollen by 7 in the morning ... But please explain to me someone why in this code:

window.addEvent('domready', function() {
    console.log(Number.random(5-20));
    alert(Number.random(5,20));
});


In the first case, it returns NaN, and in the second case, it returns a number. WHY??? =(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hom9k, 2012-03-01
@AlexFadeev

console.log(Number.random(5-20));
change the minus to a comma. Sleep at night ;)

E
egorinsk, 2012-03-01
@egorinsk

WHAT DOES MOOTOOLS DO?????

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question