Build this JavaScript Dice Roller program 🎲

  Рет қаралды 23,177

Bro Code

Bro Code

Күн бұрын

Пікірлер: 37
@BroCodez
@BroCodez Жыл бұрын
// DICE ROLLER PROGRAM function rollDice(){ const numOfDice = document.getElementById("numOfDice").value; const diceResult = document.getElementById("diceResult"); const diceImages = document.getElementById("diceImages"); const values = []; const images = []; for(let i = 0; i < numOfDice; i++){ const value = Math.floor(Math.random() * 6) + 1; values.push(value); images.push(``); } diceResult.textContent = `dice: ${values.join(', ')}`; diceImages.innerHTML = images.join(''); } Document Dice Roller # of dice: Roll Dice #container{ font-family: Arial, sans-serif; text-align: center; font-size: 2rem; font-weight: bold; } button{ font-size: 1.5rem; padding: 10px 15px; border-radius: 10px; border: none; background-color: hsl(210, 100%, 50%); color: white; font-weight: bold; cursor: pointer; } button:hover{ background-color: hsl(210, 100%, 60%); } button:active{ background-color: hsl(210, 100%, 70%); } input{ font-size: 2rem; width: 150px; text-align: center; font-weight: bold; } #diceResult{ margin: 25px; } #diceImages img{ width: 150px; margin: 5px; }
@jagadesh0805
@jagadesh0805 Жыл бұрын
Bro your videos are not showing in subscription feed when you upload.
@maxxlazos1884
@maxxlazos1884 8 ай бұрын
Can I pay you for private tutoring plz. Lmk
@FabiansLab
@FabiansLab Ай бұрын
Based. Thanks for the clear code upload. Have you considered using a repo to link to with your videos? You can get some good dev cred by doing that on GitHub
@hunin27
@hunin27 Жыл бұрын
thanks bro. I seriously learned everything from you. HTML, CSS, JAVASCRIPT, REACT, I'm also going to learn back-end next year but i wanna get more comfortable with front-end first. Thank you so so much ❤
@carlody-kr6zn
@carlody-kr6zn 4 ай бұрын
do you have front end job already?
@FUN_X_GAME
@FUN_X_GAME Жыл бұрын
Bro i am 14 and i have learnt ur python course and doing this this is soo good and clear even a 12 year old can do it with your explanation Love from Pakistan
@shubham_indalkar
@shubham_indalkar Жыл бұрын
I'm learning JavaScript and this helped a lot. Thanks
@mennatallah1986
@mennatallah1986 9 ай бұрын
Very good step by step explanation. Thank you!
@mr.nobody4159
@mr.nobody4159 10 ай бұрын
Amazingly explained... Thnx mate... Keep it up!!!
@KrishnaR780
@KrishnaR780 Жыл бұрын
Bro, could you please upload a video on Python regular expressions? Your videos have helped me get better at Python which I thank you for 🙏
@piotrmazgaj
@piotrmazgaj 3 ай бұрын
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
@vallunacoder.wecodetogether
@vallunacoder.wecodetogether 10 ай бұрын
hey BROO THANKS FOR your videos. I would like to understand how the programs know which images need to display. thanks!
@sithichook5187
@sithichook5187 Жыл бұрын
Will you have Android development with Java code Course for Beginner ?❤
@mikaverhoeven3513
@mikaverhoeven3513 Жыл бұрын
i love you bro
@murats.3481
@murats.3481 5 ай бұрын
This was a cool tutorial, thanks!
@ShabbyVelarde
@ShabbyVelarde 11 күн бұрын
It helps me alot
@MuradBayramli
@MuradBayramli Жыл бұрын
First😁😁😁😁😁😁😁
@MuradBayramli
@MuradBayramli Жыл бұрын
First😁😁😁😁
@KottNPCWARS-dp9kj
@KottNPCWARS-dp9kj Жыл бұрын
I'm sorry bro code, you ain't getting a lot of views, but there is a reason to that, everyone waits for you to make a full course, on a programming language, maybe Expand even more, like Lua, Ruby, and more. any programming language that is popular enough.
@Vffect
@Vffect Жыл бұрын
From me import lazy while bro teaches: lazy()
@ice-o3i
@ice-o3i 3 ай бұрын
Let min = 3; Let max = 50; Let commentLength = Math.floor(Math.random() * (max - min)) + min; Let letter = [“a”,”b”,”c”,d”, “ “]; Let comment = []; for(let i = 0; i < commentLength; i++){ Let next = letters[Math.floor(Math.random() * (letters.length -0))]; Comment.push(next) } Console.log(…comment);
@MuradBayramli
@MuradBayramli Жыл бұрын
First😁😁😁
@EXAML
@EXAML 13 күн бұрын
I am going to make the dices 💀 too
@pinguinosmarinela
@pinguinosmarinela Жыл бұрын
PWEASE MAKE A RUST VID LOVE YOU MAN
@manolischatzipanagiotidis2773
@manolischatzipanagiotidis2773 3 ай бұрын
can anyone explain why we used the .innerHTML property? what does it do exactly?
@saiyam_shukla7783
@saiyam_shukla7783 3 ай бұрын
i think to store the images inside the html and print it side by side
@Artic_wolf122
@Artic_wolf122 3 ай бұрын
Andriod development course pls😢😢😢😢😢😢😢
@nihongo_
@nihongo_ 8 ай бұрын
BIG W
@shivanshuhere
@shivanshuhere Жыл бұрын
Bro ☕
@adiyogi1003
@adiyogi1003 Жыл бұрын
Hi bro superb ✌️✌️🙌🙌🙌🤝🤝🙏🙏
@Jamal_Almansoub
@Jamal_Almansoub Жыл бұрын
Its not random comment 😅 I've been thinking about it ;
@hasnainmalik8982
@hasnainmalik8982 Жыл бұрын
Android app development
@user-lv5ws5gs7v
@user-lv5ws5gs7v Жыл бұрын
The code works. However, running the console.log() check, chrome console always shows errors. What is the problem? Error handling response: index.html:1 TypeError: Cannot read properties of undefined(reading 'direction') at u (chrome-extension://.........)
@mdleyan118
@mdleyan118 10 ай бұрын
Sir where is source code
@MuradBayramli
@MuradBayramli Жыл бұрын
Pin me please
@MuradBayramli
@MuradBayramli Жыл бұрын
Please pin me
Build a JavaScript random password generator 🔑
12:05
Bro Code
Рет қаралды 21 М.
Build a JS compound interest calculator 💰
18:28
Bro Code
Рет қаралды 10 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 104 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 7 МЛН
10 Tailwind Classes I Wish I Knew Earlier
13:31
Web Dev Simplified
Рет қаралды 196 М.
Learn JavaScript ELEMENT SELECTORS easy! 📑
17:38
Bro Code
Рет қаралды 29 М.
All you need to know In CSS Flexbox (Beginners  Friendly)
12:30
JavaScript Game Tutorial with HTML Canvas
27:45
Franks laboratory
Рет қаралды 81 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 669 М.
Build this JS STOPWATCH in 18 minutes! ⏱
18:06
Bro Code
Рет қаралды 32 М.
Learn the JavaScript classList property easy! 💡
16:00
Bro Code
Рет қаралды 12 М.
Learn JavaScript With These 4 Projects!
1:10:00
Tech With Tim
Рет қаралды 65 М.
JavaScript Password Generator
35:31
Traversy Media
Рет қаралды 132 М.