Ad
Code
Diff
  • export let flip_the_number = (x:number) => +[...`${x}`].reverse().join('')
    • export const flip_the_number = (x: number): number => {
    • return Number(Array.from(x.toString()).reduce((acc, s) => s + acc, ""));
    • }
    • export let flip_the_number = (x:number) => +[...`${x}`].reverse().join('')