Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 499 Bytes

File metadata and controls

30 lines (18 loc) · 499 Bytes

square-every-digit

Welcome. In this kata, you are asked to square every digit of a number.

For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is 1.

Note: The function accepts an integer and returns an integer

Install

$ npm install @abranhe/codewars

Usage

const codewars = require('@abranhe/codewars');

codewars.squareDigit(9119);
//=> 811181

API

codewars.squareDigit(input)

input

Type: number