We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
functiontimeConversion(s:string):string{// Write your code hereconstdate:Date=newDate(`10/27/2024${s}`)constdateString:string=date.toLocaleTimeString("en-us",{hour12:false})returndateString}
Can we not utilize date objects for this? I think it makes it more robust TBH
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →
Why doesn't this work?
Can we not utilize date objects for this? I think it makes it more robust TBH