Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function randomize(param1, param2, callback) {
- if (typeof callback === 'function') {
- let num1 = parseInt(param1);
- let num2 = parseInt(param2);
- callback(num1, num2);
- } else {
- console.log('BÅÄ d!!');
- }
- }
- randomize(1, '2', function (num1, num2) {
- console.log(Math.random() * (num2 - num1) + num1);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement