JavaScript & Node.js for IoT
JavaScript's reach now extends past web browsers into IoT gateways, dashboards, and even a few microcontrollers themselves.
JavaScript, running through Node.js, is a popular choice for the 'glue' layer of an IoT project: a server that collects data from many devices, a dashboard that displays live readings in a browser, or an app that talks to a device over Bluetooth or Wi-Fi. Its huge package ecosystem covers most of this networking and web-facing work.
Tools like Johnny-Five let JavaScript control Arduino-style boards directly from a PC, while frameworks such as Node-RED let you wire together IoT logic visually, in a browser, using JavaScript underneath. Espruino and a handful of other projects even run a trimmed-down JavaScript interpreter directly on a microcontroller.
JavaScript is rarely the language actually running deep inside a battery-powered sensor node, but it's extremely common in the layer that collects, displays, and reacts to the data those sensors send.
Node-RED flows connecting sensors, APIs, and alerts.
Cloud and gateway logic that devices report data to.