JS || Solution by Bharadwaj
Code\n\nvar decodeCiphertext = function (encodedText, rows) {\n    let cols = encodedText.length / rows;\n    let matrix = new Array(rows).fill(0).map((_, r) =>
# Code\n```\nvar decodeCiphertext = function (encodedText, rows) {\n    let cols = encodedText.length / rows;\n    let matrix = new Array(rows).fill(0).map((_, r) => new Array(cols).fill(0).map((_, c) => encodedText.charAt(r * cols + c)))\n    let x = 0; y = 0;\n    let decipher = "";\n    let diag = 1;\n    while (diag <= matrix[0].length) {\n        if (matrix[x] && matrix[x][y] !== undefined) decipher += matrix[x][y];\n        x++;\n        y++;\n        if (x >= matrix.length) {\n            y = diag;\n            diag++;\n            x = 0;\n        }\n    }\n    return decipher.trimEnd();\n};\n```
['JavaScript']