const y = (x => `blah ${x}…`)(x); This is the same as this. const y = `blah ${x}…`;
padding the output has different approaches (work with strings only)e.g. * you can check if number is less than 10 & add a leading zero * add leading zeros & slice the string from -1 (last digit) upto desired number of characters * e.t.c
Обсуждают сегодня