Z29740

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z29740"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z29144",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z600",
            "Z16K2": "function Z29144( Z16053K1 ) {\n\t\n\tfunction generate(number, origin){\n\t\n\t     const TEN = 10;\n    const ONE_HUNDRED = 100;\n    const ONE_THOUSAND = 1000;\n    const ONE_MILLION = 1000000;\n    const ONE_BILLION = 1000000000;           //         1.000.000.000 (9)\n    const ONE_TRILLION = 1000000000000;       //     1.000.000.000.000 (12)\n    const ONE_QUADRILLION = 1000000000000000; // 1.000.000.000.000.000 (15)\n    const MAX = 9007199254740992;             // 9.007.199.254.740.992 (15)\n\n    const LESS_THAN_TWENTY =['sa̱khat','a̱nyiung','a̱feang','a̱tat','a̱naai','a̱fwuon','a̱taa','a̱natat','a̱ni̱nai','a̱kubunyiung','swak','swak ma̱ng a̱nyiung','swak ma̱ng a̱feang','swak ma̱ng a̱tat','swak ma̱ng a̱naai','swak ma̱ng a̱fwuon','swak ma̱ng a̱taa','swak ma̱ng a̱natat','swak ma̱ng a̱ni̱nai','swak ma̱ng a̱kubunyiung']\n    const TENTHS_LESS_THAN_HUNDRED = [\n        'sa̱khat', 'swak', 'nswak nfeang', 'nswak ntat', 'nswak nnaai', 'nswak nfwuon', 'nswak a̱taa', 'nswak a̱natat', 'nswak a̱ni̱nai', 'nswak a̱kubunyiung'\n    ];\n\n    let remainder, word,\n        words = arguments[2];\n\n    \n    \n    if (number === 0) {\n        return !words ? 'sa̱khat' : words.join(' ').replace(/,$/, *);\n    }\n    \n    if (!words) {\n        words = [];\n    }\n\n    if (number \u003C 20) {\n        remainder = 0;\n        word = origin \u003E  number ? `ma̱ng ${LESS_THAN_TWENTY[number]}` : origin \u003E 100000 ? LESS_THAN_TWENTY[number]+'ma̱ng'  : LESS_THAN_TWENTY[number] ;\n        \n\n    } else if (number \u003C ONE_HUNDRED) {\n        remainder = number % TEN;\n        word =  origin \u003E number ? `ma̱ng ${TENTHS_LESS_THAN_HUNDRED[Math.floor(number / TEN)]}` : TENTHS_LESS_THAN_HUNDRED[Math.floor(number / TEN)] ;\n            \n            if (remainder) {\n                word += ' ma̱ng ' + LESS_THAN_TWENTY[remainder] ;\n                remainder = 0;\n            }\n\n    } else if (number \u003C ONE_THOUSAND) {\n        remainder = number % ONE_HUNDRED;\n        if(number === 100)\n            word  = generate(Math.floor(number/ ONE_HUNDRED)) + ' cyi';\n        else\n         word = origin \u003E number ?  `ma̱ng cyi ${generate(Math.floor(number/ ONE_HUNDRED))}` : `cyi ${generate(Math.floor(number/ ONE_HUNDRED))} ${remainder \u003E 0  ? 'ma̱ng' : *}`;\n        \n\n    }else if (number \u003C ONE_MILLION) {\n\n        remainder = number % ONE_THOUSAND;\n        if(number === 1000 || number === 100000)\n             word = origin \u003E number ? `ma̱ng ${generate(Math.floor(number/ ONE_THOUSAND)) + ' cyikwop'}` : generate(Math.floor(number/ ONE_THOUSAND)) + \" cyikwop\"; \n        else     \n        word = origin \u003E number ?  `ma̱ng cyikwop ${generate(Math.floor(number/ ONE_THOUSAND))}` : `cyikwop ${generate(Math.floor(number/ ONE_THOUSAND))}`;\n\n    } else if (number \u003C ONE_BILLION) {\n            \n        remainder = number % ONE_MILLION;\n        if(number === ONE_MILLION || number === 100000000)\n             word = origin \u003E number ? `ma̱ng ${generate(Math.floor(number/ ONE_MILLION)) + ' milyon'}` : generate(Math.floor(number/ ONE_MILLION)) + ' milyon';\n        \n        else     \n             word = origin \u003E number ?  `ma̱ng milyon ${generate(Math.floor(number/ ONE_MILLION))}` : `milyon ${generate(Math.floor(number/ ONE_MILLION))}`;\n\n\n    }else if (number \u003C ONE_TRILLION) {\n            \n        remainder = number % ONE_BILLION;\n        if(number === ONE_BILLION || number === 100000000000)\n             word = origin \u003E number ? `ma̱ng ${generate(Math.floor(number/ ONE_BILLION)) + ' bilyon'}` : generate(Math.floor(number/ ONE_BILLION)) + ' bilyon';\n        \n        else     \n          word = origin \u003E number ?  `ma̱ng bilyon ${generate(Math.floor(number/ ONE_BILLION))}` : `bilyon ${generate(Math.floor(number/ ONE_BILLION))}`;\n\n\n    }else if (number \u003C ONE_QUADRILLION) {\n            \n        remainder = number % ONE_TRILLION;\n        if(number === ONE_TRILLION || number ===100000000000000)\n             word = origin \u003E number ? `ma̱ng ${generate(Math.floor(number/ ONE_TRILLION)) + ' ti̱rilyon'}` : generate(Math.floor(number/ ONE_TRILLION)) + ' ti̱rilyon';\n        else     \n            word = origin \u003E number ?  `ma̱ng ti̱rilyon ${generate(Math.floor(number/ ONE_TRILLION))} ` : `ti̱rilyon ${generate(Math.floor(number/ ONE_TRILLION))}`;\n\n\n    }else if( number \u003E= ONE_QUADRILLION){\n\t    \tWikifunctions.Error(\"Z28307\",[String(number),String(ONE_QUADRILLION-1),\"kcg\"]);\n\t    }\n\t    \n\t    \n\t    words.push(word);\n\t    return generate(remainder,origin, words);\n\n\t}\n\n\tlet words;\n    let num = Number(Z16053K1);\n    let originNum = num;\n    \n    words = generate(num,originNum);\n    \n    let number = \"\"+ words; // convert this string the tradational way.\n\n    let num_list = number.split(\" \"); // convert into a list for processing.\n\n    const num_list_size = num_list.length; // get the length of the  list.\n\n    let formatted_text = \"\";\n\n    for (let index = 0; index \u003C num_list.length; index++) {\n        \n        if(num_list[index] != \"\")\n        \tif(index == num_list.length-1)\n        \t\tformatted_text += num_list[index];\n            else\n            \tformatted_text += num_list[index] + \" \";\n\n        if(num_list[index] == num_list[index+1] \u0026\u0026 index+1 \u003C= num_list_size)\n            index = index+1;\n        \n    }\n\n    return formatted_text;\n\n}"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "tyap cardinal in javascript"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1179",
                "Z11K2": "kadi̱nat ntyap mi̱ javascript"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}