2 projects with Async JS | chai aur #javascript

preview_player
Показать описание
#javascript #hindi
Sara code yaha milta h

Discord pe yaha paaye jaate h:
Instagram pe yaha paaye jaate h:
Рекомендации по теме
Комментарии
Автор

Solution for task 1 at 16:38

const saydate = function(str){
console.log(str, Date.now())
}
let Interval;

.addEventListener('click', function(){
Interval = setInterval (saydate, 1000, 'Anything')

} )

.addEventListener ("click", function(){
clearInterval (Interval)
})

I'm extremely grateful to this channel! This is the most in depth tutorial for JS I've ever found!

learner
Автор

cheeze itni easy hoti nahi jitni easy aap bana dete ho sir, I wish I found you during my clg time, but nevertheless I know u are here always to help us. Thanks you so much.

vrajverma
Автор

3:28 setTimeour( )
10:02 clearTimeour()
13:40 setInterval()
15:46 clearInerval()
17:05 project 6 (Background Color Changer)
32:02 project 5 (keyboard checker)
( : ye lo Bhai Ji : )

code_with_okg
Автор

Hardly any tutor taught clearTimeout() in their tutorials. Kahan the aap Hitesh ji itne time se. You're a blessing in disguise. ❤

thecalgarians
Автор

SetTimeout(function/function reference, milliseconds)
ClearTimeout(variable which hold the reference of settimeout)
SetInterval(function /functiom reference, milisecond) - repeat until we clear it.
ClearInterval(reverence of function)

kanakgupta
Автор

23:29 you guys can also use this for random colors

//GET RGBA FOR BACKGROUND COLOR STRING
function getRGBA() {
let random1 = Math.floor(Math.random() * 255);
let random2 = Math.floor(Math.random() * 255);
let random3 = Math.floor(Math.random() * 255);
return `rgba(${random1}, ${random2}, ${random3})`;
}

ahtishams
Автор

Task 16:30
My solution
<script>
const stInt = function(str){
console.log(str, Date.now());
}
let interVal;
document.querySelector('#start').addEventListener('click', function(){
interValid = setInterval(stInt, 1000, 'Hello World');
})
document.querySelector('#stop').addEventListener('click', function(){
clearInterval(interValid);
console.log('clicked');
})

</script>

Hamza-Pro-Dev
Автор

Great content Hitesh, I hope more and more people find this amazing channel where you make things so easy to understand. When I was working on an app (MERN - Chat Application) I found these topics tricky because just a keyword await had so much power that it was not encrypting the passwords I was sending to the DB. After hours of debugging, it made me realize that I need to learn such topics first to be able to build such application. But what good way to learn than a project. Anyhow! I am glad that we have people like you in tech helping us in our journey.

piyushramnani
Автор

Pahle chai bna leta hu fir chai ke saath video dekhunga 😅

inamali
Автор

31:20
We are checking intervalId is not null then only start the interval otherwise it would create the multiple instances of the setInterval which would change the background color much faster and the stop button would not be able to clear all intervals if initially we have clicked on start button multiple times and then we click on stop button.

tarunsoni
Автор

First of all I want to mention that the course is fire. So far, among all the courses I have taken this one has more in-depth concepts and I am really happy to find out that such free course exits. I would request Hitesh Sir to bring more courses like this in the future.

FaojulAzim-kf
Автор

I can tell my two months journey into full stack. I found it daunting to master backend. I switched to firebase. Next i started small projects in JS but i had to throw it all away once i started building a task management website using react. Its completely different, doing small projects and building something you want to according to your vision. There are ao many things involved. I didn't even do any react hooks individually but i am implementing and trying to understand them in the website. Its daunting, challenging.

supratiksarkar
Автор

Sir 3din phle start kiya JavaScript apke channel pe aur lgbhag aadha Video dekh liya practical bhut acha smjhaye apne 🥰

Vishal_
Автор

16:30
Task-1


let interval_Variable;
let myDate = new Date();
document.querySelector('#start').addEventListener('click', ()=>
{
interval_Variable= setInterval(function(){
console.log('Hello Shubh', myDate.toLocaleString());
}, 10000)

})
document.querySelector('#stop').addEventListener('click', ()=>
{
clearInterval( interval_Variable);
console.log('stopped');
})

shubhanshushrivastava
Автор

one of the best channel for learning out standing i love it... big love big respect for you sir from pakistan.
Task One
<h1> Chai Or Javascript </h1>
<button id="start">start</button>
<button id="stop">stop</button>
<script>
const date = function(){
console.log("waleed", Date.now());
}
document.querySelector('#start').addEventListener('click', function(){
const intervaled = setInterval(date, 1000);
console.log("Start");

document.querySelector('#stop').addEventListener('click', function () {
clearInterval(intervaled);
console.log("Stop");
})})

waleedraja
Автор

I think the 'Stop' button not 'seemingly' working at 29:10 is not because of indexId value being changed from null to the reference of setInterval() but because of that prior to clicking the 'Stop' button, the 'Start' button was clicked multiple times hence multiple setInterval() methods are running simultaneously. The indexId has the reference of only the last setInterval() and the references of the previously started intervals have been lost. Clicking on 'Stop' clears that process but the other prior started setIntervals continue to run hence it appears that 'Stop' did not work at all. The check if(!intervalId) ensures that if an interval is already executing, another interval should not start. Great series overall! Enjoyed watching and doing the projects myself alongside

divyajyotibasu
Автор

Sir i love the way of ur teaching.... I literallyy amazed after seeing ur video... I learned the enhanced perspective of learning of web development... Please sir made video fast

adityashukla
Автор

Ek esa yt channel jo javascript ka series pura vistrit rup se patha rahe hai. Aapko iske lie bahut bahut dhanyawad ❤❤😊

_pankajuday
Автор

assingment solution:::
<script>
const TOprint = function (str) {
console.log(str + Date.now());
};

let printing;
function start() {
printing=setInterval(TOprint, 2000, "time is:");
}
document.querySelector("#start").addEventListener("click", start);

document.querySelector("#stop").addEventListener("click", function () {
clearInterval(printing);
});


</script>

tusharsahu
Автор

3:28 setTimeour( )
10:02 clearTimeour()
13:40 setInterval()
15:46 clearInerval()
17:05 project 6 (Background Color Changer)
32:02 project 5 (keyboard checker)

ChiragGarg-jlim
visit shbcf.ru