MCPcopy Create free account
hub / github.com/codemistic/Web-Development / setminute

Function setminute

clockn/main.js:23–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23function setminute() {
24 const now = new Date();
25
26 const minutes = now.getMinutes();
27 const m = ((minutes*6)-90);
28 console.log(m);
29
30
31 minutehand.style.transform = `rotate(${m}deg)`;
32
33 //using properties that have : , :is replaced by = and than the ahead part comes in backticks
34 //whenever you are writing a varible const use ${} and whenever you use ${} you must use `` backtics (i.e esc down button) to close your brackets
35 // how to change the class of an elemt by js , make that new class in css and use elementconstname.classList.add('newstyleclassname');
36
37}
38
39setInterval(setdate,1000);
40setInterval(setminute,1000);

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected