https://github.com/developer-shourav/scpc__final_task
https://github.com/developer-shourav/scpc__final_task
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/developer-shourav/scpc__final_task
- Owner: developer-shourav
- Created: 2023-07-25T07:00:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T14:53:21.000Z (almost 3 years ago)
- Last Synced: 2025-02-15T15:48:32.292Z (over 1 year ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Solve any 7 question using Javascript
- Task 1 : Create a function that takes a string as input and returns the reversed version of the string without using the built-in reverse() method.
**Example `Input: "hello world"` Example `Output: "dlrow olleh"`**
- Task 2 : Create a function that takes an array of numbers as input and returns the sum of all positive numbers in the array.
**Example `Input: [2, -5, 10, -3, 7]` Example` Output: 19`**
- Task 3: Write a JavaScript program to find the most frequent element in an array and return it.
**Example `Input: [3, 5, 2, 5, 3, 3, 1, 4, 5]` Example `Output: 3`**
- Task 4: 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.
**Example `Input: ([1, 3, 6, 8, 11, 15], 9)` Example `Output: [1, 2] (numbers at indices 1 and 2: 3 + 6 = 9)`**
- Task 5: Implement a simple JavaScript calculator. The calculator should take two numbers and an operator (+, -, *, /) as input and return the result of the operation.
- Task 6: 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.
- Task 7: 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.
- Task 8: Implement a JavaScript function to find the second smallest element in an array of numbers. The function should return the second smallest number.