Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for [old] Morse Clock by mozurin
"use strict";
function morseClock(data)
{
const lengthDefs = [2, 4, 3, 4, 3, 4];
return data.split(':').map(
(e, p1) => [...e.padStart(2, '0')].map(
(d, p2) => parseInt(d).toString(2).padStart(
lengthDefs[p1 * 2 + p2],
'0'
).replace(/0/g, '.').replace(/1/g, '-')
).join(' ')
).join(' : ');
}
June 18, 2018
Comments: