Articles → JAVASCRIPT → Array Foreach Loop In Javascript
Array Foreach Loop In Javascript
Purpose
Example
<!DOCTYPE html>
<html lang="en">
<head>
<script>
var arr = ["e1", "e2", "e3"];
arr.forEach((obj, index) => {
console.log(obj);
});
</script>
</head>
<body></body></html>
Output