// setting any of these to false will prevent the associated example from producing alerts
var alertConfig = {
eachOn: false,
eachVerbose: false,
everyOn: false,
mapOn_verbose: false,
parallelOn: false,
seriesOn: false,
waterfallOn: false
}
// random example string array for async.map and async.each to operate on.
var watArr = ["A-well-a", "everybody's heard about the bird",
"Bird, bird, bird, b-bird's the word", "a-well-a",
"Bird, bird, bird, b-bird's the word",
"A-well-a, everybody's heard about the bird",
"Bird, bird, bird, b-bird's the word",
"A-well-a, bird, bird, bird, well, the bird is the word",
"Well", "everybody knows", "that the bird is the word",
"A-well-a, bird", "Surfin' bird",
"Bbbbbbbbbbbbbbbbbb", "aaah",
"A-well-a, bird, bird, bird, b-bird's the word"];
// COVERED: each, waterfall, parallel, series, every, map
//*************************************************************************************************//
//
// async.series
//
//Run tasks array of fns in parallel, w/out waiting until prev fn done. If any fn pass err to cb, final cb called w/ the err; once all done, results passed to final cb as an array
//*************************************************************************************************//
//*************************************************************************************************//
//
// async.every
//
//Run tasks array of fns in parallel, w/out waiting until prev fn done. If any fn pass err to cb, final cb called w/ the err; once all done, results passed to final cb as an array
(function tryingEvery(){
var isItANum = function isItANumber(num, callback){
logEv(num);
callback(typeof num === 'number');
}
async.every([3597345, 1, 3, 5, 183, 2], isItANum, function(result){
logEv("ASYNC.EVERY RESULT::: " + result);
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.