[Solved] javascript: what is the best way to do synchronous programming [closed]

The JavaScript runtime is a single-threaded environment – – that is, it executes a single command at a time (synchronous). However, the browser that hosts the JavaScript runtime runs in a multi-threaded environment (the operating system). This means that while the JavaScript runtime can only process one line of code at a time, the browser … Read more

[Solved] how to make a while loop in nodejs to be a series

I (very quickly, so it probably has errors) rewrote this using async.forEachOfSeries to iterate over your attachments. I used async.forEachOf for the database writes as I don’t see a need for them to be in series. var async = require(‘async’); if (issue.fields.attachment != ”) { async.forEachOfSeries(issue.fields.attachment,function(attachment,r,callback){ if (typeof issue.fields.attachment[r].content != “undefined”) { var url = … Read more