---
title: "Discussion on \"Different styles of writing  JavaScript functions\" | Hashnode"
description: "Discussion on \"Different styles of writing  JavaScript functions\". Arrow functions\nlet sumOfTwoNumbers=(a,b)=>{\n  return a+b;\n}\nlet sumOfTwoNumbers=(a,b)=>a+b\nlet checkEven=n=>n%2==0;\n\nNamed functions\nfunction sumOfTwoNumbers (a,b){\n  return a+b;\n}\n\nFunction expression\nlet sumOfTwoNumbers=function (a,b){\n return a+b..."
url: "https://hashnode.com/posts/different-styles-of-writing-javascript-functions/61e02ea8ffa55d74f00897e3"
---

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

Discussion

# [Different styles of writing JavaScript functions](https://prudhvi.hashnode.dev/different-styles-of-writing-javascript-functions?utm_source=hashnode&utm_medium=feed)

Arrow functions let sumOfTwoNumbers=(a,b)=>{ return a+b; } let sumOfTwoNumbers=(a,b)=>a+b let checkEven=n=>n%2==0; Named functions function sumOfTwoNumbers (a,b){ return a+b; } Function expression let sumOfTwoNumbers=function (a,b){ return a+b...

Jan 13, 2022 · 1 min read · prudhvi.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#functional-programming](https://hashnode.com/tag/functional-programming)

## Written by

[prudhvi chinnam](https://hashnode.com/@Prudhvi06)

@Prudhvi06

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

Student

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
