This repository contains JavaScript solutions to various programming challenges. Below, you'll find descriptions of each task along with their corresponding solutions.
Create a function that takes a string as input and returns the reversed version of the string without using the built-in reverse() method.
Input: "hello world"
Output: "dlrow olleh"
Create a function that takes an array of numbers as input and returns the sum of all positive numbers in the array.
Input: [2, -5, 10, -3, 7]
Output: 19
Write a JavaScript program to find the most frequent element in an array and return it.
Input: [3, 5, 2, 5, 3, 3, 1, 4, 5]
Output: 3
Create a function that takes a sorted array of numbers and a target value as input. The function should find two numbers in the array that add up to the target value. Return an array containing the indices of the two numbers.
Input: ([1, 3, 6, 8, 11, 15], 9)
Output: [1, 2] (numbers at indices 1 and 2: 3 + 6 = 9)
Implement a simple JavaScript calculator. The calculator should take two numbers and an operator (+, -, *, /) as input and return the result of the operation.
Create a program that generates a random password of a specified length. The password should include a mix of uppercase letters, lowercase letters, numbers, and special characters.
Implement a function that converts a Roman numeral to an integer. The function should take a Roman numeral string (e.g., "IX" or "XXI") as input and return the corresponding integer value.
Implement a JavaScript function to find the second smallest element in an array of numbers. The function should return the second smallest number.