Assume I may have up to 150 slides that I need to go to on a timeline that's not always at a fixed interval, and I don't want to write 150 lines of the setTimeout() function. In my example I have (520, 1300, 2800, 5420, 6111, 6222, 7999, etc.), and you can imagine this will be a long list of timeouts.
Since the argument for the gotoSlide() function uses a string like "side-ID-###", where the ### value is linear, incrementing from 1, I'm wondering if this could be done in some kind of loop, where the timeout interval value is derived from an array. --That's my assumption at least.
Not sure how to write that code. Could someone help me?
Not such a great deal, Ultimate, which gives you full 5080 features is $181.99 CAD per month, that's $2183.88 per year, I can buy the 5080 for $1809.99 CAD, then it goes up to $279.99 per month after the first billing cycle. Typical cloud rental, costs more than buying the hardware.
Wow, spoken like a true blind hater, you don't even provide arguments. Please, go check my comment above to @seacaptain and you'll find out why what you say doesn't make sense in this context...
Get used to this, with AI tooling now uncovering new vulns and getting them exploitable far faster than has ever been possible before software is going to need to be updated far more frequently.
Back in the day it may take reseachers weeks or months to do what AI can now do in hours.
Once its a threat is discovered it's weaponsized far more quickly, meaning you simply can't be waiting 2, 3, 4 weeks to deploy a patch, it needs to be patched immediately.
Going to be interesting handling this in the enterprise space where traditionally patching has been steady, but very staged (and rightly so up until now), that is going to have to change.
Question
Brian Miller
Is there a more elegant way to do something like this?
Assume I may have up to 150 slides that I need to go to on a timeline that's not always at a fixed interval, and I don't want to write 150 lines of the setTimeout() function. In my example I have (520, 1300, 2800, 5420, 6111, 6222, 7999, etc.), and you can imagine this will be a long list of timeouts.
Since the argument for the gotoSlide() function uses a string like "side-ID-###", where the ### value is linear, incrementing from 1, I'm wondering if this could be done in some kind of loop, where the timeout interval value is derived from an array. --That's my assumption at least.
Not sure how to write that code. Could someone help me?
Link to comment
https://www.neowin.net/forum/topic/1428242-js-multiple-settimeouts/Share on other sites
6 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now