Javascript

Sum of Odd Numbers in an Array
AskAI

The problem is to write a function that calculates the sum of the odd numbers in an array. An example input would be [1, 2, 3, 4, 5] and the corresponding output would be 9.

Reverse a string without using any built-in string methods.
AskAI

To reverse a string without using any built-in string methods, you can loop through the string and build a new string with the characters in reverse order.

Find the Largest Sum of Any Contiguous Subarray
AskAI

This problem asks you to find the largest sum of any contiguous subarray within an array of integers. For example, given the input array [3, -2, 5, -1], the largest sum would be 6 (3 + -2 + 5).

The Difference Between for Loops and forEach Methods in JavaScript
AskAI

The forEach method is more efficient than using a for loop to iterate over an array, because it avoids creating a new scope for each iteration.

Summing Even Numbers in an Array
AskAI

This technical problem deals with writing a function that returns the sum of the even numbers in an array. An example input and output are provided.

Reverse the order of words in a string
AskAI

Given a string, this program will reverse the order of the words.

"Reverse a string in JavaScript"
AskAI

This technical problem deals with reversing a string in JavaScript. Given a string of length n, the function should return the string reversed. For example, given the input string "abcdef", the output should be "fedcba".

Sum of Array Elements
AskAI

This problem asks you to write a function that takes an array of integers and returns the sum of the array's elements. For example, given the input [1, 2, 3, 4 , 5], the function should return 15.