---
title: "Discussion on \"JS - Loops and Higher Order function\" | Hashnode"
description: "Discussion on \"JS - Loops and Higher Order function\". loops are helpful when we want to execute the same code a lot of times.\nfor loop\nHere below is a example of printing 1 to 10\nfor(let i = 1; i <= 5; i++){\n    console.log(i)\n}\n\nOutput\n1\n2\n3\n4\n5\n\nPointe"
url: "https://hashnode.com/posts/js-loops-and-higher-order-function/69ce9b110ff860b6de0ca811"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JS - Loops and Higher Order function](https://javascriptfromscratch.hashnode.dev/js-loops-and-higher-order-function?utm_source=hashnode&utm_medium=feed)

loops are helpful when we want to execute the same code a lot of times. for loop Here below is a example of printing 1 to 10 for(let i = 1; i <= 5; i++){ console.log(i) } Output 1 2 3 4 5 Pointe

Apr 2 · 11 min read · javascriptfromscratch.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#higher-order-functions](https://hashnode.com/tag/higher-order-functions)
-   [#foreach](https://hashnode.com/tag/foreach)
-   [#reduce-method](https://hashnode.com/tag/reduce-method)
-   [#for-of-loop](https://hashnode.com/tag/for-of-loop)
-   [#for-in-loop](https://hashnode.com/tag/for-in-loop)

## Written by

[Gambit](https://hashnode.com/@onchiangambit)

@onchiangambit

  
[View profile](https://hashnode.com/@onchiangambit)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
