Hitesh, your concept of viewing and doing is too good. Examples you have selected are excellent, easy to understand. Technically to the point. Hope to see more in further videos
let upper = 1; let lower = 10; if (upper > lower) { let randomizer = function(up, low) { let myRandom = Math.random() * (up - low); let final = myRandom + 20; return `the random value inclusive of ${upper} and ${lower} is ${Math.round( final )}`; }; console.log(randomizer(upper, lower)); } else if (upper === lower) { console.log("Upper Lower can't be same"); } else { console.log("Upper value cannot be smaller than Lower"); } Thanks, bro I used Math.round to include both upper limit and lower limit.
such an interesting video, looking for it quite long time . lotsOfLove keep rocking Hitesh , 'm on my mac cant put smiles here please take all my wishes
Hi Hitesh, great to follow your videos.I am learning a lot from these videos.Thanks a lot!! Here I have written a very simple game.I want to share the code let userTurn=function(){ let user = Number(prompt('enter a random number')); return user; } let computerTurn=function(){ let system = Math.floor(Math.random()*10); return system; } for(i=1;ib){ console.log('user wins'); } else{ console.log('computer wins'); } } What do you say about the code and how can I make it better. Thanks in advance.
yeah well, im back! and this looks way too easy. Ive used the math.random function in more complicated functions such as color and string generators. Don't give up!
@@dikshitkaushik8387 nothing wrong with the code bro. He has checked whether the message is exist? if its true return message. He has done a wonderful job
Thanks for putting the tutorial together. :) Is there a way to Password Protect online videos (RUclips, Vimeo... etc) with some if not all of these features? Random Password Set the Expiration time or date Set the Total time a video can be viewed Set how many times the password is allowed Setup Password Groups I know it's asking a lot, if you're busy, I understand. You seem to have the skills to make it happen. Just putting it out there.
Instead of Math.Floor, if we provide '0' value to the toFixed it still shows integer value without any decimal places then what's the point of using the Math.floor? Please explain...
*Just because you started this series your subscribers got increased a lot I think You should put some more free series on react native & database connectivity with same as well it will increase subscribers in Huge nos*
Check again. Views on regular videos is high and views on JS series is so low. Anyways, these numbers are just numbers. I am just looking to move forward.
I think you are a developer...may be you know which are the mostly used all functions in Math lib . May be this will be useful. Because there are many in the documentation.
Hello sir can you please explain me this code //generate random numbers between 83 to 93 let upper = 93; let lower = 83; let randomNum = Math.ceil(Math.random() *(upper - lower)) + lower; console.log(randomNum);
93 - 83 = 10 . so you random a number from 0 to 10. and the end "+lower" means 83. , which means you random a number from 83 to 83 +10 which is 93, and result is 83 to 93
You are so great teacher. Your work is highly appreciable.
such a
Thank you for the tutorial! Coming from Python, the start/end looks complex VS:
import random
dice = random.randrange(20, 26)
Hitesh, your concept of viewing and doing is too good. Examples you have selected are excellent, easy to understand. Technically to the point. Hope to see more in further videos
let upper = 1;
let lower = 10;
if (upper > lower) {
let randomizer = function(up, low) {
let myRandom = Math.random() * (up - low);
let final = myRandom + 20;
return `the random value inclusive of ${upper} and ${lower} is ${Math.round(
final
)}`;
};
console.log(randomizer(upper, lower));
} else if (upper === lower) {
console.log("Upper Lower can't be same");
} else {
console.log("Upper value cannot be smaller than Lower");
}
Thanks, bro I used Math.round to include both upper limit and lower limit.
Thanks man, I was looking for this because I didn't understand how it works but you explain it very well and simple. Greetings from Venezuela.
that was quite a good explanation man thank you I have been looking so much but couldn't find any except yours. thanks again
such an interesting video, looking for it quite long time . lotsOfLove keep rocking Hitesh , 'm on my mac cant put smiles here please take all my wishes
Never Seen a Teacher like u✔
Loving this series alot
Hoping to have a complete bunch of JS series
And sir please give alot of projects along with them
This is really cool one!
And you''re the great mentor for us!
you're a
Hi Hitesh, great to follow your videos.I am learning a lot from these videos.Thanks a lot!!
Here I have written a very simple game.I want to share the code
let userTurn=function(){
let user = Number(prompt('enter a random number'));
return user;
}
let computerTurn=function(){
let system = Math.floor(Math.random()*10);
return system;
}
for(i=1;ib){
console.log('user wins');
}
else{
console.log('computer wins');
}
}
What do you say about the code and how can I make it better.
Thanks in advance.
You are not a programmer , you are a magician
ceil and floor are actually other names for Lowest Integer Function and Greatest Integer Function
Thank you.. Now I understand the formula..
Always nice stuffs from you. And I want to know if you can share your system configuration pls
it was 1:30 in the morning and you were making videos for us
Your dedication really inspires..!👌👍🏼
i can;'t wrap my head around the fact that i would have never been able to write this function from the top of my head
yeah well, im back! and this looks way too easy. Ive used the math.random function in more complicated functions such as color and string generators. Don't give up!
22/7 is not Pi, it’s just close to Pi. Pi is an infinitely long string of numbers, and is therefore impossible to write as a fraction.
let message = "I love the tutorial";
if(message)
{
console.log(message);
}
thank you sir. I am enjoying your tutorial.
Thanks
bhai there is no need if if else statement and u not use properly that if else statement stuff
@@dikshitkaushik8387 nothing wrong with the code bro. He has checked whether the message is exist? if its true return message. He has done a wonderful job
Thanks you sir , I clearly understand How it work
Thanks for putting the tutorial together. :)
Is there a way to Password Protect online videos (RUclips, Vimeo... etc) with some if not all of these features?
Random Password
Set the Expiration time or date
Set the Total time a video can be viewed
Set how many times the password is allowed
Setup Password Groups
I know it's asking a lot, if you're busy, I understand. You seem to have the skills to make it happen. Just putting it out there.
Thanks bro.. i liked the way you explain the details. Subscribed!!
23 video u ask subscribe , just now i did that. awesome videos .....life time videos
love your teaching keep uploading videous like even if u dont get many views later on but many really watch all of it
It's really an awesome tutorials for beginners. I am going to subscribe it.
Wow I really enjoii this series
Thanks sir for this video 😊
let floatRes = Result
can also bring the same output, no neet to write to.Fixed(2) for twice. at 5:12
Instead of Math.Floor, if we provide '0' value to the toFixed it still shows integer value without any decimal places then what's the point of using the Math.floor?
Please explain...
And this series is really awesome
we should use round() for get its closest integer so why we use floor or ceil
Finally my confusion was clear
sir, i like this video as compare to random password generator project.
this is beyond perfect.
thanks a ton.
*Just because you started this series your subscribers got increased a lot
I think You should put some more free series on react native & database connectivity with same as well it will increase subscribers in Huge nos*
Check again. Views on regular videos is high and views on JS series is so low. Anyways, these numbers are just numbers. I am just looking to move forward.
I dont know why did you take this long route, i think you could have simply showed us :
let dice = Math.floor(Math.random()*6)+1
and its done.
maybe he is trying to teach upper and lower concept.
btw I got output by using Math.floor(Math.random()*6)+1 thanku
Thanks I understand The concept now
I think you are a developer...may be you know which are the mostly used all functions in Math lib . May be this will be useful. Because there are many in the documentation.
sir how we can genreate random number in a given range without using math.Random() in javascript
how to stop generating the same random numbers with the database I want to generate roll numbers which should not be same so tell me.
But sir I have also got 0 .... sir what is the reason... please reply
please also give series lyk this for node n react js too
Available here
courses.learncodeonline.in
Result = 22/7
But u have forgot to put let or var before result...
But you got correct answer..How}??
in javascript if you do not declare var or let the variable is still accessible and it becomes a global variable
@@michaelobeng7660 yes you are true
watch his viedoe of var and let he is telling local and global
Can u create website for me i want to hire u as developer?
concept clear thanks
wao,, Another great video.
"THE" best :)
sir , wud u please tell us tht how to make dynamic img slider using JS ??????
Thanku
Thank you you are great !
math.random() * 5+1 doesn't gave 0 value how to deal with that
Smallest Code
let a = Math.ceil(Math.random()*6);
console.log(a);
Thank you so much sir......
I NEED PANCARD VALIDATION THROUGH THE TEXTBOX THAT 5TH CHARACTER IN PANCARD NUMBER MUST MATCHES WITH THE SURNAME
9:52 starts talking about random
Hello sir can you please explain me this code
//generate random numbers between 83 to 93
let upper = 93;
let lower = 83;
let randomNum = Math.ceil(Math.random() *(upper - lower)) + lower;
console.log(randomNum);
93 - 83 = 10 . so you random a number from 0 to 10. and the end "+lower" means 83. , which means you random a number from 83 to 83 +10 which is 93, and result is 83 to 93
You have used ceil so range will be from 1 to 10, + lower will make the range 84 to 93
Nice sir:)
thank you
Thanks
why can't we just use math.ceil on math.random()*6
can you please elabore by which i can try
Why don't we need to import math first?
who is here in 2020-corona panademic ?
thanks sir
Thanks Hitesh for being awesome. I just created a function for random and let me know what you think?
jsbin.com/comuruh/edit?js,console
Well random in python is easy than js
Figura del partido
I think you are working in google
yes sir
That was not tricky at all sir. Catched in the very first exercise.
2:35 :DDDDDD
do you love maths? cuz i hate it
😂😂
thank you