python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Print two array one after another(with interval) in javascript
I have two array :
numbers:[1,2,3,4]
letters: ["a","b","c","d"]
I want to print as the numbers array first with time interval of 3 sec and then print letters ar...
jsancho
Votes: 0
Answers: 4
Can't pause slideshow with cleartimeout
So I'm learning javascript and I'm currently working on an assignment where I need to create a banner that cycles through multiple images with a pause button, problem is, I can't seem to pause it with...
Fábio Santos
Votes: 0
Answers: 1
State inside useEffect
I've no problems with the below code but I wanna be sure if there is no memory leak or something like that in this component.
const Nav = () => {
const [activeNav,setActiveNav] = useState("&...
Luciano Barrabino
Votes: 0
Answers: 0
How can i make so when i click a button it will resolve a promise, and if i click again it will wait untill the previous promise is resolved
let msg = "Done";
function promise() {
return new Promise((resolve) => {
setTimeout(() => {
resolve("Done");
}, 2000);
});
}
async function func1() {
...
Fuad Isayev
Votes: 0
Answers: 1