Skip to content

Instantly share code, notes, and snippets.

View mathenls's full-sized avatar

Matheus Lucas da Silva mathenls

View GitHub Profile
/*
You are given 2 numbers as strings, and you need to sum them assuming that you can't simply parse them as integers
cause the numbers may be too big to be stored as an integer
Return the sum as a string
*/
function sumStrings(str1, str2) {
// Your code here
}
function test(str1, str2, solution) {
/*
You are given 2 numbers as strings, and you need to sum them assuming that you can't simply parse them as integers
cause the numbers may be too big to be stored as an integer
Return the sum as a string
*/
function sumStrings(str1, str2) {
const parsedDigits1 = str1
.split('')
.reverse()
.map((digit) => parseInt(digit));