From 12144df405e811725d2cda24322d2be0b064bf2c Mon Sep 17 00:00:00 2001 From: fatmaevin Date: Sat, 7 Jun 2025 15:02:34 +0000 Subject: [PATCH] we answered the questions --- questions-and-reviews/questions/0.md | 6 ++++-- questions-and-reviews/questions/1.js | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/questions-and-reviews/questions/0.md b/questions-and-reviews/questions/0.md index ab3127d7..24f08368 100644 --- a/questions-and-reviews/questions/0.md +++ b/questions-and-reviews/questions/0.md @@ -19,10 +19,12 @@ const result2 = logSum(10, 32); ``` a) what will `result1` evaluate to? Explain your answer +-The calculateSum function takes two arguments (a and b), adds them together, and returns the result. b) What will `result2` evaluate to? Explain your answer +-The logSum function adds a and b, then logs the result to the console using console.log(a + b). c) Try to summarise the main difference between `logSum` and `calculateSum` +-calculateSum returns the result of a + b, allowing you to use that value elsewhere in your code. - -{YOUR ANSWERS HERE} +-logSum prints the result to the console but does not return anything. diff --git a/questions-and-reviews/questions/1.js b/questions-and-reviews/questions/1.js index c1a020eb..1dd397bb 100644 --- a/questions-and-reviews/questions/1.js +++ b/questions-and-reviews/questions/1.js @@ -2,4 +2,7 @@ // Remember to write your prediction first, before you run this file const currentYear = 2023; -currentYear(); \ No newline at end of file +currentYear(); + + +