Closed koorosh13hm closed 10 years ago
be setInterval
dovom yek adade random yani javabe bargashti function mirese na khode function
doroste yeki azin 2raveshe
//Second part:
function getRandomInt (min , max){
console.log(Math.floor(Math.random() * (max - min + 1) + min));
};
function timer () {
getRandomInt(0 , 15)
}
setInterval(timer , 1000);
ravesh herfeyi tar
//Second part:
function getRandomInt (min , max){
console.log(Math.floor(Math.random() * (max - min + 1) + min));
};
setInterval(getRandomInt , 1000, 0, 15);
dar zemn ma function ro be yeli az in do shekl tarif mikonim va na tarkibi az hardosh
// First part
var randomizer = function (){
console.log(Math.random());
};
ya
// First part
function randomizer (){
console.log(Math.random());
};
Aghaye aziz, mesle hamishe mamnoonam.
manam yek chizi yad gereftam mamnun az har2 :+1:
Dar kode kheyli sadeye zir faghat "First part" kar mikonad. Lotfan man ra rahnamayii konid ke chera console, "Second part" ra faghat yek bar khorooji midahad !! az lotfe shoma sepas gozaram.
https://gist.github.com/Rabioso/8202744