text: const CustomError = require("../extensions/custom-error");
  
  module.exports = class DepthCalculator {
    constructor(){
      this.count = 0
    }
    calculateDepth(arr) {
      this.count++
      for (let item of arr){
  
        if (!Array.isArray(item) && arr.indexOf(item) == arr.length - 1){
          let ans = this.count
          this.count = 0 
          return ans
        }
        else if(Array.isArray(item)){
          return this.calculateDepth(item)
        }
      }
      let t = this.count
      this.count = 0
      console.log(t)
      return t
    }
  };
  
  
  