text: import { NotImplementedError } from '../extensions/index.js';
  
  /**
   * Given some integer, find the maximal number you can obtain
   * by deleting exactly one digit of the given number.
   *
   * @param {Number} n
   * @return {Number}
   *
   * @example
   * For n = 152, the output should be 52
   *
   */
  export default function deleteDigit(n) {
      let result = '';
      let arr = n
        .toString()
        .split('')
        .map((item) => Number(item));
      let minIndex = arr.indexOf(Math.min(...arr));
      for (let i = 0; i < arr.length; i++) {
        if (i != minIndex) {
          result += arr[i];
        }
      }
      return +result;
  }
  