In programming, we often have
the situation that, when
calling a possibly
time-consuming input/output
(I/O) operation (or any
long-running operation,
e.g., for performing a
complex computation), the
program execution has to
wait for its result being
returned before it can go
on. Calling such an
operation and waiting for
its result, while the main
program's further execution
(and its entire thread) is
blocked, represents a
synchronous
operation call.
As opposed to the less
powerful Arduino, the
competitively priced and
WiFi-enabled ESP8266
supports the Web-of-Things
(WoT) since it can be
programmed in JavaScript.
Don't confuse a DOM
collection with a JS
array: Array functions,
such as the
forEach
looping method, cannot
be applied to a DOM
collection!
For instance, when you
retrieve all rows of an HTML
table element, you get an
HTMLCollection,
which is an array-like
object, but not an instance
of Array, and
therefore the following code
does not succeed because the
Array method
forEach is not
defined for an
HTMLCollection
like
myTableEl.rows: