From eafd36f6aa840fece24be41f7ef3abf33e291e47 Mon Sep 17 00:00:00 2001 From: Abdul Wahab Date: Thu, 10 Aug 2023 15:28:44 +0200 Subject: [PATCH] Fixed: Function Expression Syntax (#4324) The syntax for Function Expression was incorrect. It was an example of a function declared using Function Declaration. --- .../roadmaps/typescript/content/106-functions/index.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/data/roadmaps/typescript/content/106-functions/index.md b/src/data/roadmaps/typescript/content/106-functions/index.md index 5ccb5b652..66dd5147a 100644 --- a/src/data/roadmaps/typescript/content/106-functions/index.md +++ b/src/data/roadmaps/typescript/content/106-functions/index.md @@ -13,12 +13,9 @@ function name(param1: type1, param2: type2, ...): returnType { > Function Expression Syntax: ```typescript -function add(a: number, b: number): number { - return a + b; -} - -let result = add(1, 2); -console.log(result); // 3 +let name = function(param1: type1, param2: type2, ...): returnType { + return value; +}; ``` Learn more from the following links: