UNPKG

sussy-util

Version:
11 lines (10 loc) 369 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) => { return parseFloat(n.toString().substring(0, pos - 1).concat(n.toString().substring(pos, n))); };