{"ScriptPreparationCode":null,"TestCases":[{"Name":"1 All together","Code":"const getDuration = () =\u003E {\r\n const duration = moment.duration(1234567, \u0027seconds\u0027);\r\n const days = Math.floor(duration.asDays());\r\n const time = \u0060${days \u003E 0 ? \u0060${days}d\u0060 : \u0027\u0027}${duration.hours()}h${duration.minutes()}m\u0060;\r\n return time;\r\n}\r\n\r\nfor (let i = 0; i \u003C 1000; \u002B\u002Bi) {\r\n console.log(getDuration());\r\n}","IsDeferred":false},{"Name":"2 Separate concats","Code":"const getDuration = () =\u003E {\r\n const seconds = 1234567;\r\n const duration = moment.duration(seconds, \u0027seconds\u0027);\r\n\r\n let time = \u0027\u0027;\r\n const days = Math.floor(duration.asDays());\r\n\r\n if (days \u003E 0) {\r\n time \u002B= days \u002B \u0027d\u0027;\r\n }\r\n\r\n time \u002B= duration.hours() \u002B\u0027h\u0027 \u002B duration.minutes() \u002B \u0027m\u0027;\r\n\r\n return time;\r\n}\r\n\r\nfor (let i = 0; i \u003C 1000; \u002B\u002Bi) {\r\n console.log(getDuration());\r\n}","IsDeferred":false}]}