const exerciseItems = [
["crunches", 30],
["crunches", 45],
["squats", 30],
["squats", 45],
["lunges", 30],
["lunges", 45],
["wall sits", 30],
["wall sits", 45],
["push ups", 30],
["push ups", 45],
["leg ups", 30],
["leg ups", 45],
["jumping jacks", 30],
["jumping jacks", 45],
["sumo squat", 30],
["sumo squat", 45]
];
I need help with a JavaScript function that involves iterating through the 'exerciseItems' array, extracting the number value from each item, and using it as the delay for a setInterval outside of the function. Is this feasible?
Your assistance is greatly appreciated as I am still in the process of familiarizing myself with JavaScript.
Check out the demo here: https://jsfiddle.net/mattbtay/dcqdf8ng/1/