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

You only need one - Beginner

Question

Given an array of integers your solution should find the smallest integer. You can assume, for the purpose of this kata, that the supplied array will not be empty. For example:

Given [34, 15, 88, 2] your solution will return 2 Given [34, -345, -1, 100] your solution will return -345

Solution by -

My Solution


	class SmallestIntegerFinder {
		findSmallestInt(args) {
			let sortedArray = args.sort((a,b) => a-b)
			return sortedArray[0]
		}
		}
				

Try it yourself - CodeWars

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

You only need one - Beginner

Question

Given an array of integers your solution should find the smallest integer. You can assume, for the purpose of this kata, that the supplied array will not be empty. For example:

Given [34, 15, 88, 2] your solution will return 2 Given [34, -345, -1, 100] your solution will return -345

Solution by -

My Solution


	class SmallestIntegerFinder {
		findSmallestInt(args) {
			let sortedArray = args.sort((a,b) => a-b)
			return sortedArray[0]
		}
		}
				

Try it yourself - CodeWars

>>>>>>> 0e614172debaa009c8d31330edbeb3b765b59c39