Slalom interview question

Add two strings together written out as an integer. Ex "12" + "5" return "17"

Interview Answer

Anonymous

2 Apr 2018

In javascript parseInt("12") + parseInt("5") However, I'd put the logic into a reusable function: parseInt(a) + parseInt(b) instead then call with the values for arguments.