Recently, I encountered something quite unusual.
I am attempting to separate a string containing a time (e.g. "12:00", "13:30") into two distinct integers. I experimented with the following approach:
timeString = "12:00"
[hours, minutes] = timeString.split(":").map(parseInt)
However, the output for minutes turns out to be NaN.
Initially, I suspected that parseInt was causing an issue when processing "00", but upon testing parseInt("00") in the console, it resulted in 0.
Could someone provide some clarification on this matter?