When the wheel is prone to damage from small bumps, and can't handle off-road, a new stronger reliable wheel that handles all terrain is needed. That's what Jquery offers.
$('.tpm_sensors').forEach(function(sensor) { if (sensor.pressure < threshold) fixBeforeIDie(); });
vs:
var tpm_sensors = document.getElementsByClassName('tpm_sensors'); for (var i = 0, len = tpm_sensors.length; i < len; i++) { var sensor = tpm_sensors[i]; if (sensor.pressure < threshold) fixBeforeIDie(); }
And so it starts. jQuery uses .each, not .forEach. So you fix that. But stuff still doesn't work.
Right, because jQuery's .each passes the index as first parameter and the element as second (or this).
jQuery trips me every single time.