JavaScript Solution - Simulation
\nvar decodeCiphertext = function(encodedText, rows) {\n    const n = encodedText.length;\n    const cols = n / rows;\n    let res = "";\n    \n    for (let i =
```\nvar decodeCiphertext = function(encodedText, rows) {\n    const n = encodedText.length;\n    const cols = n / rows;\n    let res = "";\n    \n    for (let i = 0; i < cols; ++i) {\n        let str = "";\n        \n        let row = 0;\n        let col = i % cols;\n        \n        while (row < rows && col < cols) {\n            const idx = (row * cols) + col;\n            \n            str += encodedText.charAt(idx);\n            \n            row += 1;\n            col += 1;\n        }\n        \n        res += str;\n    }\n\n    return res.trimEnd();\n};\n```
['Simulation', 'JavaScript']