ts array foreach code example Example: typescript foreach let num = [7, 8, 9]; num.forEach(function (value) { console.log(value); });