UNPKG

sussy-util

Version:
12 lines (11 loc) 357 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * @param {number} n - n number * @param {number} pos - position of the digit to remove * @returns {number} returns the number without the nth digit */ exports.default = (n, pos) => +n .toString() .substring(0, pos - 1) .concat(n.toString().substring(pos, n));