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:
@@ -22,9 +22,9 @@ const DateDayDifference = (date1, date2) => {
|
||||
if (typeof date1 !== 'string' && typeof date2 !== 'string') {
|
||||
return new TypeError('Argument is not a string.')
|
||||
}
|
||||
// extarct the first date
|
||||
// extract the first date
|
||||
const [firstDateDay, firstDateMonth, firstDateYear] = date1.split('/').map((ele) => Number(ele))
|
||||
// extarct the second date
|
||||
// extract the second date
|
||||
const [secondDateDay, secondDateMonth, secondDateYear] = date2.split('/').map((ele) => Number(ele))
|
||||
// check the both data are valid or not.
|
||||
if (firstDateDay < 0 || firstDateDay > 31 ||
|
||||
|
||||
Reference in New Issue
Block a user