mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
fixed some spellings
This commit is contained in:
@@ -44,7 +44,7 @@ const DateToDay = (date) => {
|
||||
if (typeof date !== 'string') {
|
||||
return new TypeError('Argument is not a string.')
|
||||
}
|
||||
// extarct the date
|
||||
// extract the date
|
||||
const [day, month, year] = date.split('/').map((x) => Number(x))
|
||||
// check the data are valid or not.
|
||||
if (day < 0 || day > 31 || month > 12 || month < 0) {
|
||||
|
||||
Reference in New Issue
Block a user