<<<<<<< HEAD Code Wars - Brett Crafton

Sum The Strings

Question

Create a function that takes 2 integers in form of a string as an input, and outputs the sum (also as a string): Notes: If either input is an empty string, consider it as zero. Inputs and the expected output will never exceed the signed 32-bit integer limit (2^31 - 1) Example: (Input1, Input2 -->Output)

"4", "5" --> "9" "34", "5" --> "39" "", "" --> "0" "2", "" --> "2" "-5", "3" --> "-2"

Solution by -

My Solution


	function sumStr(a,b) {
		return String(+a + +b)
		}
				

Try it yourself - CodeWars

======= Code Wars - Brett Crafton

Sum The Strings

Question

Create a function that takes 2 integers in form of a string as an input, and outputs the sum (also as a string): Notes: If either input is an empty string, consider it as zero. Inputs and the expected output will never exceed the signed 32-bit integer limit (2^31 - 1) Example: (Input1, Input2 -->Output)

"4", "5" --> "9" "34", "5" --> "39" "", "" --> "0" "2", "" --> "2" "-5", "3" --> "-2"

Solution by -

My Solution


	function sumStr(a,b) {
		return String(+a + +b)
		}
				

Try it yourself - CodeWars

>>>>>>> 0e614172debaa009c8d31330edbeb3b765b59c39