Creating a Clock: Exercise 6 Solution | JavaScript Tutorial In Hindi #62

preview_player
Показать описание


Best Hindi Videos For Learning Programming:

►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -

►Django Complete Course In Hindi -

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

We can also display the time in a single line using

let CurrTime = new Date();
let Time =
console.log(Time);

Works the same!!

vedantbirla
Автор

This is better code


function currentTime(){
let content =
let date = new Date();
let time = date.toLocaleTimeString();
content.innerHTML = time;

}
setInterval(currentTime, 1000);

usamausman
Автор

Most underrated teacher of the youtube regarding these stuffs..
Sir..🙏🏻...
You have a very clear and great level of teaching..
Great concepts..
Thankyou

kapil
Автор

we can use this also
date=new Date()
let // this will return time in hh:mm:ss AM/PM formate

tushargogiya
Автор

Data structure and algorithm series kab aye gee

saadchaudhary
Автор

There is a small correction in code line no-21 line no-17 se pehle aaygi otherwise AM & PM method will work oppositely !!
check n correct me if i'am wrong ?

GauravKumar-dwml
Автор

Harry bhai....mere according isme jb aapne ise railway clock se digital clock m Change kiya that means hours ki value always 1 to 12 hi rehegi that's means it will always giv AM it is not changing when its afternoon ... please check it and explain how to do correction...if i am correct

arpitjain
Автор

Bhai itna bada code likhne ki jarurat nahi thi

Shah-Aryan
Автор

Bhaiya java pe oop concept par video la do, plzzz

technohub
Автор

to solve the am-pm issue, just (set the am-pm) first and then set the (time to12-hour format) as shown below:
//setting am-pm
let timeOfDay = currentHour < 12 ? "AM" : "PM";

//setting to 12-hour format
currentHour = (currentHour > 12) ? currentHour-12 : currentHour;
currentHour = (currentHour == 0) ? 12 : currentHour;

sundeepbasak
Автор

Sir Mera kohi error Nahi show Kar Raha phirbhi browser mein clock show Nahi ho Raha hai

CodeMan
Автор

bro toLocaleTimeString function kyu ni use kiya aapne?

ashishsingla
Автор

bro there is a mistake in code because when hour will be 13 or greater than 13 then time in PM but according to code time in AM
please check the code

sauravkumarjha
Автор

bhai apne jo currentHour banaya haior usamai jo condition di hai wo pm kabhi show hi nhi kregi kyunki app hour ko upgrade krke hamesha 12 ke niche hi rakh rahe ho

shreeyanshbandal
Автор

Bhai plz fighting game banao na python se plz

cocktailstudio
Автор

sir please make tutorial on React Native🙏

amantiwari
Автор

Please make more python tutorials in your English channel programming with harry.

engineerbhai
Автор

// another method looks shorter..
console.log("here we go .... lets's make a JavaScript clock");

const clock =

function updateTime() {
let currentDate = new Date();
let currentTime =
clock.innerHTML = currentTime;
}

setInterval(() => {
updateTime();
}, 1000);

sayyedmaroof
Автор

function updateClock() {
let myTime = new Date();

// USing Destructuring Array
let [currentHour, currentMins, currentSecs] = [myTime.getHours(), myTime.getMinutes(), myTime.getSeconds()];

// Turnary if statement -- if less than 10 then add 0 before it
currentHour = (currentHour < 10 ? "0": "") + currentHour;
currentMins = (currentMins < 10 ? "0": "") + currentMins;
currentSecs = (currentSecs < 10 ? "0": "") + currentSecs;


let clock =
clock.innerHTML =
};

// updateClock() and setInterval('updateClock()', 1000) being set in Body tag of HTML Document as onload();

shaistakamran
Автор

bhai me apki python wali videos dekh raha hu
ye code samaj nahi aa raha hai please help karo.

for i in range(1, int(input())):
print((10**i)//9*i)

themagneto
welcome to shbcf.ru