Solve the no connection puzzle: Difference between revisions

Content added Content deleted
(→‎JS ES6: Updated primitives, tidied.)
m (→‎JS ES6: Pruned out one unused function.)
Line 1,862: Line 1,862:
) : parseInt(Number(x))
) : parseInt(Number(x))
) : x.codePointAt(0);
) : x.codePointAt(0);


// justifyRight :: Int -> Char -> String -> String
const justifyRight = n =>
// The string s, preceded by enough padding (with
// the character c) to reach the string length n.
c => s => n > s.length ? (
s.padStart(n, c)
) : s;