Counter program in JavaScript ↕️【3 minutes】

  Рет қаралды 52,594

Bro Code

Bro Code

Күн бұрын

Пікірлер: 55
@BroCodez
@BroCodez 2 жыл бұрын
let count = 0; document.getElementById("decreaseBtn").onclick = function(){ count-=1; document.getElementById("countLabel").innerHTML = count; } document.getElementById("resetBtn").onclick = function(){ count=0; document.getElementById("countLabel").innerHTML = count; } document.getElementById("increaseBtn").onclick = function(){ count+=1; document.getElementById("countLabel").innerHTML = count; } Document 0 decrease reset increase #countLabel{ display: block; text-align: center; font-size: 50px; }
@EJS0814
@EJS0814 Жыл бұрын
my 0 in my browser is not align with the buttons but working
@joyceasante8292
@joyceasante8292 Жыл бұрын
Practicing(Coding along) Document 0 decrease reset increase *********************************** #countLabel{ display: block; text - align: center; font-size: 50px; } *************************************** let count = 0; document.getElementById("decreaseBtn").onclick = function(){ count -=1; document.getElementById("countLabel").innerHTML = count; } document.getElementById("resetBtn").onclick = function(){ count =0; document.getElementById("countLabel").innerHTML = count; } document.getElementById("increaseBtn").onclick = function(){ count += 1; document.getElementById("countLabel").innerHTML = count; }
@snagseeker
@snagseeker Жыл бұрын
yes@@EJS0814
@Jamer197
@Jamer197 Жыл бұрын
How do I copy it on ipad
@mohammed1hussin245
@mohammed1hussin245 7 ай бұрын
​@@Jamer197 Open from browser and copy
@lovelypicturepro
@lovelypicturepro 7 ай бұрын
Thank you so much for not making frightening code that no one understands. I also love how you type slowly so I don't have to pause all the time!
@relaxingsoundsandmusic9100
@relaxingsoundsandmusic9100 2 жыл бұрын
This is amazing. Learning JS is so much faster and easier through this. These videos will speed up my journey to become a self employed web developer/developer alot probably.
@Crime_pays
@Crime_pays Жыл бұрын
will comment back again when i get the job
@Hookening
@Hookening Жыл бұрын
Did you get make it?
@Brozitch
@Brozitch Жыл бұрын
did you?
@Gymrat256
@Gymrat256 Ай бұрын
@@Crime_pays how are you now bro?
@katiak74
@katiak74 2 жыл бұрын
I am doing a javascript course and your teach this a lot easy that my teacher! Thanks!
@KristianTheDesigner
@KristianTheDesigner Жыл бұрын
I have JUST started to dip my pinky into the js pool and this video saved me from going mental 😄 THANK YOU!
@skott199
@skott199 Жыл бұрын
Worked perfectly and have tried for some time now without luck on other tutorials! Tysm for the help!
@justttn
@justttn 2 жыл бұрын
Great pace and concise, just what I needed 🤯
@lirimbytyqi1
@lirimbytyqi1 2 жыл бұрын
Excellent explanation!
@AdrianStefanik1
@AdrianStefanik1 Жыл бұрын
Hello Bro! I am sitting back, I am relaxed and I am going to enjoy this show... as you said... so I am giving a like for this video in advance, before going through it... Cheers!
@малосольные-окурки
@малосольные-окурки 7 ай бұрын
just imagine how many lives you have changed. mine - you have 💯. thank you very much! 🙏
@bakhromkhalikulov7558
@bakhromkhalikulov7558 Жыл бұрын
GREAT. THANK YOU!
@gptinsights
@gptinsights 2 жыл бұрын
your videos are great! thanks so much for sharing
@hoatranminh5216
@hoatranminh5216 Жыл бұрын
Thank you, Bro
@RamonJPerez86
@RamonJPerez86 2 жыл бұрын
Excellent video...
@JJ-ot3ps
@JJ-ot3ps Жыл бұрын
hi bro, when you increase to 10, then click the button of decrease, it goes to 9, does that mean the count variable inside the decrease function refers to the count variable to the increases function?
@DamosyTheFreckle
@DamosyTheFreckle 5 ай бұрын
I did this, it is amazing! But everytime I refresh or close tab, I lose the number where I previously left off. How do I make it such that everytime I refresh, i still get the previously stored number?
@emojibenji
@emojibenji Жыл бұрын
It won't work for me, the numbers won't increase or decrease when I click the buttons and I did notice there's no semi colons at the end of these 3 statement, but I can't do that for mine, they keep appearing after all curly braces. I'm stuck.
@arkanzahrawaani1594
@arkanzahrawaani1594 Жыл бұрын
any tips for c#? im currently starting to learn the programming language from there
@jeevaks03
@jeevaks03 8 ай бұрын
Hi guys the program that showed in this video has small error after reset if you click decrease it will to go -1 to fix this replace this in the decrease function if(count>0){ count--; document.getElementbyId("countLabel").innerHTML=count; }
@alphoan853
@alphoan853 Жыл бұрын
Cannot set properties of null (setting 'onclick' ) HELPPPPPP
@zlayanovorossia7114
@zlayanovorossia7114 Жыл бұрын
same
@alexanderberg9463
@alexanderberg9463 Жыл бұрын
wrap your index.js code with window.onload = function(){ // your code };
@TheEvertonDias
@TheEvertonDias Жыл бұрын
Thanks, Bro!
@michaelpatrick777
@michaelpatrick777 10 ай бұрын
Thank you BroCode
@prawnstudio
@prawnstudio Жыл бұрын
bro this code is not working
@Virenv3
@Virenv3 Ай бұрын
Yes
@Rudra-f7m
@Rudra-f7m 17 күн бұрын
Then you did something wrong. Javascript doesn't change 😂
@serhan8638
@serhan8638 Жыл бұрын
Thanks bro!
@strawhatmally943
@strawhatmally943 2 жыл бұрын
Need help do you have a discord or telegram channel I keep getting purple parentheses 🤦🏾‍♂️
@jad4937
@jad4937 2 жыл бұрын
whats the problem with that
@MrLoser-ks2xn
@MrLoser-ks2xn Жыл бұрын
Thanks!
@Starculation
@Starculation Жыл бұрын
But at the very start you paste code but the right side of the part is cut off and I don't know what it says
@Starculation
@Starculation Жыл бұрын
Oh Sorry I saw it in your comment
@lucabinder9829
@lucabinder9829 2 жыл бұрын
Thanks BRO!
@bahatiyves
@bahatiyves 2 жыл бұрын
Bro code rule 1: Have your bro's back, no matter what. You did😉
@hafizMAhashmi
@hafizMAhashmi Жыл бұрын
Thank You
@MohyDev
@MohyDev 2 жыл бұрын
// For the KZbin algorithm!
@recursion.
@recursion. 2 жыл бұрын
to the algorithm for the algorithm, explanation of syntaxes woulda been great
@penguinxed
@penguinxed 2 жыл бұрын
thanks bro
@KURO_NEGM
@KURO_NEGM Жыл бұрын
Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') at document.getElementById.onclick dont know what to do SOMEONE HELP PLS!!!!!!
@anandomia3161
@anandomia3161 2 жыл бұрын
Awesome
@M4XIMUMN
@M4XIMUMN Жыл бұрын
bruh my chrome not counting buttons as huttons they saying there text
@harshjha4451
@harshjha4451 2 жыл бұрын
ima fellow bro
@muzamilzaman7463
@muzamilzaman7463 2 жыл бұрын
What about JavaScript counter for time
@cyrax6361
@cyrax6361 3 ай бұрын
its not working css doesnt work
@Taecy7454
@Taecy7454 7 ай бұрын
Random Commment
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 700 М.
A game of TicTacToe written in JavaScript ⭕
18:57
Bro Code
Рет қаралды 128 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,3 МЛН
The different types of JavaScript functions explained
14:47
Kevin Powell
Рет қаралды 45 М.
Learn DOM Manipulation In 18 Minutes
18:37
Web Dev Simplified
Рет қаралды 1 МЛН
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Random number generator in JavaScript 🎲【4 minutes】
4:01
How To Actually Achieve Your Goals in 2025 (Evidence-Based)
15:15
A stopwatch written in JavaScript ⏱️
12:14
Bro Code
Рет қаралды 33 М.
How to FETCH data from an API using JavaScript ↩️
14:17
Bro Code
Рет қаралды 168 М.
Build JavaScript ROCK PAPER SCISSORS in 18 minutes! 👊
18:54