Тесты в разделе "Модуль 3. JS Функции. Оператор Spread (распаковка аргументов)" #105
Closed
Nadezzzhda
started this conversation in
Ideas
Replies: 1 comment
-
|
Nadezzzhda, добрый день! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Здравствуйте!
Упражнение в разделе "Модуль 3. JS Функции. Оператор Spread (распаковка аргументов)" решила следующим образом:
const convert = (...dates) => {
let stringDates = []
for (const date of dates) {
const stringDate = new Date(date).toDateString()
stringDates.push(stringDate)
}
return stringDates
}
export default convert
Тесты случайно прошли, хотя не должны были. Как я поняла, мне просто повезло, что строка date спарсилась так, как нужно.
Возможно, имеет смысл усилить тесты.
Beta Was this translation helpful? Give feedback.
All reactions