My first JS Project! I barely had any JS exposure, and it started looking more like Greek and less comprehensive. That's when I knew I had to build something to make sense of everything. Thanks a ton! This helped a lot in making concepts stick. I intend to do all 25. 🎉
@Epikht2 жыл бұрын
I know some Js but it was kinda hard for me to turn them into project and the fact that you explain everything from the very beginning deserve a follow ❤ Thank you
@clydeforland5944 Жыл бұрын
Just stumbled arcoss this and my mind is blown! Aspiring Front End & UX Designer here. Thanks for this!!
@lenenousi49653 жыл бұрын
Thanks. Now I understood use for bootstrap. Practice is much better for learning. I loved it!
@insurgentamine9220 Жыл бұрын
its amazing
@anmolrai14382 жыл бұрын
you're the one i was searching for to start a project as a beginner🙏🙏🙏🙏
@oluwatosingbolabo9201 Жыл бұрын
thank you so much for serving us a self explanatory tutorial, this is simplicity in its simplest form
@fadzaiemmahnembaware11 ай бұрын
Well explained, I understood this video as a beginer.
@aka...7943 Жыл бұрын
شكرا لك من اعماق قلبي على هذا الشرح المفهوم و المختصر في نفس الوقت 🤍
@saifadnan864 Жыл бұрын
good visual explanation as it's needed for learners
@arthabhunter Жыл бұрын
thankyou very much . the way you revise the what this things do appreciate bro.
@dr.kamrunnahar2209 Жыл бұрын
Thank you so much, I've been learning js but I had no idea how to use it in codes. This video really helped a lot...
@farhadcohan32452 жыл бұрын
I have watched many videos so far you are the best bcz you explain everything in very simple way🤙🙏
@1littlehelper Жыл бұрын
very good example of 'practice makes perfect'. Thank you for the videos - learnt a lot!
@alialpert.8144 Жыл бұрын
Simple and very effective video, I !m really grateful for the effort. thanks a lot🙏
@subie20332 жыл бұрын
Great video! You've actually made me feel like I was programing something!!
@Joe-qp9ix4 ай бұрын
I know these videos are older but if you do ever end up making more, I would recommend giving some more explanations. I just went along with what you said through the first half of the video without any idea as to why or what I was doing, and you were all over the place. IDE, browser, IDE, browser..
@soundarTech Жыл бұрын
Actually your video is too good , but in my opinion , function changeColors(){ const r = Math.floor(Math.random()*255); const g = Math.floor(Math.random()*255); const b = Math.floor(Math.random()*255); body.style.background = `rgb(${r},${g},${b})`; It will create an random Colors between 0 to 255 colors I hope this will helpful.❤ If you love this , pin me ♥️♥️
@kazi5432 Жыл бұрын
it should be * 256
@caretib4283 Жыл бұрын
function change() { const r = Math.floor(Math.random() * 255); const g = Math.floor(Math.random() * 255); const b = Math.floor(Math.random() * 255); document.querySelector("body").style.background = `rgb(${r},${g},${b})`; }
@delanlee28973 жыл бұрын
Thank you SO much this video is awesome!
@chantelm73042 жыл бұрын
Thanks, awesome video!
@danylipsker3 жыл бұрын
Thanks to you I start to understand web design Thanks
@thepratikshow2666 Жыл бұрын
amazing learned a lot today
@akashnimgade1631 Жыл бұрын
thank you for this project bro...
@rosen.espinoza94773 жыл бұрын
Thank you for this!
@moaad95 Жыл бұрын
Thanks for video, i enjoyed it. i have a suggestion for the index update: index = index % colors.length; This means no need for the if statement.
@MODY-qz3lw3 ай бұрын
It worked , thanks ❤
@abuaqeel2922 жыл бұрын
function changColor() { var color = ["red", "green", "black", "yellow"] document.querySelector(".container").style.background = color[Math.floor(Math.random() * color.length)] }
@seenup90562 жыл бұрын
can you explain me why width not fully covered please.
@elg281 Жыл бұрын
So ... Instead of using 0 in your function you could use 1 and the first color to run would be blue. Correct? I'll try it out.
@codefoxx Жыл бұрын
Yes
@teclyt_solutions3839 Жыл бұрын
Thanks for this tutorial
@powderberrykun2 жыл бұрын
Before I start my real projects, I use this one as kind of a warm up.
@BrownStore Жыл бұрын
I am so lost. when I try and type style.background = colors[index++]; it does nothing on my end. I'm not sure what I'm doing wrong
@MariosGeorgiosKatis3 ай бұрын
its document.getElementsByTagName("body")[0].style.background = colors[index++]; all together !!!! i just found out
@sahinduezguen9 ай бұрын
Nice little tutorial. Thx! Just curious: how would the JS-script look like if i'd want to change to color of the container AND the body but with different values? Like, the container in yellow but the body in red.
@stmike30033 жыл бұрын
Thank you very much!
@sudarshanahire3 жыл бұрын
Learn in a different style of code thanks
@constantine90742 жыл бұрын
great content !!
@codefoxx2 жыл бұрын
Thank you
@HHJoshHH Жыл бұрын
Never-mind I figured out I screwed up the index = 0 by saying index = o. 🤦🏻♂️
@teflonrozay1074 Жыл бұрын
Nice one
@icbinroshen4618 Жыл бұрын
Thanks for the video
@farhadcohan32452 жыл бұрын
Yes your video on to list groceries
@yvng46972 жыл бұрын
this is kinda weird i wrote everything as u wrote but js doesnt work
@codefoxx2 жыл бұрын
Did you link the js file in the html?
@yvng46972 жыл бұрын
@@codefoxx am gonna do this project again, next time i will use bootstrap and everything coz i didnt use it
@khushisaraswat5826 Жыл бұрын
Thank u so much bro
@lachiemiles57374 ай бұрын
the colour only changes once when I run. Changes to red, then nothing else?
@ps2530 Жыл бұрын
but still very good video thanks 🤩
@thatsawesome. Жыл бұрын
Thank you so much :)))
@kazianzuman64013 жыл бұрын
i was following this video , but my JS didn't work. my button didn't change colors . Can u fix this !!
@kazianzuman64013 жыл бұрын
var index = 0; function changeColors() {var colors = ["red","blue","yellow","green","purple"]; document.getElementsByTagName("body")[0]. style.background = colors[index++]; if (index > colors.length -1) index = 0; }
@kazianzuman64013 жыл бұрын
just figured , my js file was not linked properly :D . it was an awesome video . Merci Beaucoup!!
@mohdsameer7433 Жыл бұрын
Hello sir , Awesome i'm a beignner this is good i only don't understand why your are creat a index variable i tryed with out that index variable it's doesn't work can you tell me?
@jimcari7255 Жыл бұрын
Great lesson, I need help though, my background colors do not change, the JS section does not seem to work for me
@billy4549 Жыл бұрын
It was the case for me too..but here some modifications to make: function changeColors(){ var colors = ["red","blue","yellow","green","purple","orange","black"] var bodyElement = document.getElementsByTagName("Body")[0]; bodyElement.style.background = colors[index++]; if (index > colors.length -1) index = 0; } It should work!!
@bilalerdem8264 Жыл бұрын
@@billy4549 I f**king worship you man! thx
@farhadcohan32452 жыл бұрын
Everything is exact same but when I click to add or delete it does not work I used console it show there is problem with pencil code please help here thank you again
@codefoxx2 жыл бұрын
Are you referring to the Grocery list project?
@codefoxx2 жыл бұрын
Did you add an id to the pencil in the html file?
@farhadcohan32452 жыл бұрын
@@codefoxx yes u did I followed you word by word I have to tell you my browser is Firefox I don't know if got anything to do with I checked over and over getElements but class name are no issue class by ID pencil is problem
@Multaniprince557 Жыл бұрын
Thanks Boss!
@sdvasd Жыл бұрын
thank you
@faisalamin0013 жыл бұрын
Thank you!!!!
@thisizavian3691 Жыл бұрын
Great video a series! I have one input, why didn't you just do if(index > 5). It produces the same result. Thanks!
@dr.kamrunnahar2209 Жыл бұрын
Since you can use as many colors in array, this (color.length) will work every time, Doesn't matter how many colors are there in the array...
@thisizavian3691 Жыл бұрын
@@dr.kamrunnahar2209 ahhhh, I seee. Thanks.
@areebahmed1773 Жыл бұрын
@@dr.kamrunnahar2209 and we dont need to put -1 in color.length, right?
@HHJoshHH Жыл бұрын
Followed this tutorial perfectly but I can’t get the colors to start over again at red. Can ya help me?
@afsanarousne8941 Жыл бұрын
thnx bro
@23mohdmujeeb10 ай бұрын
Thanks, but this good did not work for me, may be i am doing some mistake, but it check your link and source, your JS code is entirely different then video, when copy paste your actual code, its working
@raohadeed9268 Жыл бұрын
If we don't use index=0 in js What will happen😊.
@Dope_Stories Жыл бұрын
IDK if I am crazy or what but this does not work it is also missing {} on the if statement but that did not fix it ffor me either
@braindead2813 Жыл бұрын
wow! this is 10x slower than python I am shook!
@mohammedyunus3968 Жыл бұрын
can't we do it without bootstrap just with CSS??
@codefoxx Жыл бұрын
Yes
@t3true-games2 жыл бұрын
cool thx
@DwightTam Жыл бұрын
11:09 missing some {
@cristaltechaira16023 жыл бұрын
Thanks
@farhadcohan32452 жыл бұрын
Anyone does not understands how html CSS JS have to watch your videos then they all will arrived to AHA moment thanks again could do a video about JS syntax's like how do you know to use them I followed step by steps your to do list (groceries video) but I'm getting error on pencil code I checked everything like spelling quatations to
@ps2530 Жыл бұрын
It doesn't really work at my side I did everything but when I click it doesn't change the colors😶
@CrispyCrust00 Жыл бұрын
same here. tried 3 different times from scratch. everything is word for word and it doesnt work.
@CrispyCrust00 Жыл бұрын
very confused. i had it all setup properly. change the link from src="file name" to href="file name" then swapped back to src again and now it links properly. gotta love it.
@aikadxuk730311 ай бұрын
@@CrispyCrust00Nope, just write
@grigoldvali41248 ай бұрын
Hello, can you explain, why this code doesnt work? thanks a lot var index = 0; function changeColors(){ var colors = ["red", "blue", "green", "yellow", "orange", "purple"]; document.getElementsByTagName("body"[0]). style.background = colors[index++]; if(index > colors.length - 1) index = 0; }
@Minh-tx9qp8 ай бұрын
hello i am new to coding but i can maybe help : you wrote ("body"[0]) instead of ("body")[0].
@grigoldvali41248 ай бұрын
@@Minh-tx9qp thanks
@MhamedVdel Жыл бұрын
i didn't understand -1 after length somone to me please
@leinyuymarie5570Ай бұрын
I started 06/11/24 see me at the end..😊😊😊😊😊
@msd54953 жыл бұрын
create project using time interval
@codefoxx3 жыл бұрын
Just include the setTimeout() function inside the changeColor() function and set it to whatever time you want. For example, setTimeout(changeColor, 3000)
@msd54953 жыл бұрын
@@codefoxx okay
@martynaspuotkalis4117 Жыл бұрын
Good example but not enough explanations. Otherwise, thanks for sharing.
@kathirvel.m818416 күн бұрын
Bro I don't got out
@AdewunmiOluwole7 ай бұрын
Not straight forward, i don't get it...😥
@AdewunmiOluwole7 ай бұрын
Not clear
@chumbuzzy4694 Жыл бұрын
Сan you help please. I want the color that is currently on the background to be displayed, I can do this with if, else conditions. But I'm sure there is a better way, I now just output the entire array. const button = document.querySelector('.change__color'); const colorTxt = document.getElementsByClassName('color')[0]; let index = 0; button.addEventListener('click', function(event) { let colors = ["red", "blue", "pink", "black", "orange", "green", "white"]; const body = document.body; body.style.backgroundColor = colors[index++]; if(index > colors.length -1) { index = 0; }; if(body.style.backgroundColor == 'black') { colorTxt.style.color = '#fff'; } else { colorTxt.style.color = '#333'; }; colorTxt.innerHTML = `Цвет меняется`; });
@23mohdmujeeb10 ай бұрын
This is code from your actual sheet source code: var colors = ["Orangered","Blue","Yellow","Green","Orange", "Cyan","DodgerBlue", "Violet", "Navy", "Purple", "YellowGreen", "OrangeRed", "SlateBlue", "Salmon", "Crimson", "HotPink", "Magenta"]; var index = 0; document.querySelector("#submit").addEventListener("click", () => { if(index > colors.length - 1) index = 0; document.body.style.backgroundColor = colors[index++]; });