I’m an aspiring Frontend Developer currently learning JavaScript. I’m passionate about building user-friendly interfaces and bringing ideas to life in the browser. I enjoy solving problems and am building a foundation in HTML, CSS, and JavaScript to create engaging web experiences. I’m eager to grow my skills and contribute to real-world projects.
Create a function that returns the sum of the two lowest positive numbers given an array of minimum 4 positive integers. No floats or non-positive integers will be passed.
function sumTwoSmallestNumbers(numbers) {
const sort=numbers.sort((a,b)=>a-b);
return sort[0]+sort[1];
}