From 31fec80062cf66def30b4f4064e44f1f910a86f9 Mon Sep 17 00:00:00 2001 From: Asad Alam Date: Fri, 17 Dec 2021 21:53:43 +0530 Subject: [PATCH 1/2] Add note in the instructions.append.md --- exercises/practice/gigasecond/.docs/instructions.append.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/exercises/practice/gigasecond/.docs/instructions.append.md b/exercises/practice/gigasecond/.docs/instructions.append.md index 141df047d8..cc610e0e44 100644 --- a/exercises/practice/gigasecond/.docs/instructions.append.md +++ b/exercises/practice/gigasecond/.docs/instructions.append.md @@ -1,3 +1,10 @@ # Instructions append +## Notes +The input and output of the `gigasecond` function is of type [Date][date-link]. + It is possible to return a correct value for this exercise by mutating the solution function argument. Although there are legitimate use cases for mutating function arguments, this is usually undesirable, and in the case of this exercise, clearly unexpected. For this reason, the test suite has a test that fails in case the argument has been modified after the function execution. + +[date-link]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date + + From 5331a23d697387cb5962f5b9c9fa9f79a9adb79a Mon Sep 17 00:00:00 2001 From: Asad Alam Date: Fri, 17 Dec 2021 22:10:44 +0530 Subject: [PATCH 2/2] Add note in the instructions.append.md --- exercises/practice/gigasecond/.docs/instructions.append.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/exercises/practice/gigasecond/.docs/instructions.append.md b/exercises/practice/gigasecond/.docs/instructions.append.md index cc610e0e44..4faa77522c 100644 --- a/exercises/practice/gigasecond/.docs/instructions.append.md +++ b/exercises/practice/gigasecond/.docs/instructions.append.md @@ -1,10 +1,9 @@ # Instructions append ## Notes + The input and output of the `gigasecond` function is of type [Date][date-link]. It is possible to return a correct value for this exercise by mutating the solution function argument. Although there are legitimate use cases for mutating function arguments, this is usually undesirable, and in the case of this exercise, clearly unexpected. For this reason, the test suite has a test that fails in case the argument has been modified after the function execution. [date-link]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date - -