# JavaScript Coding Assignments
This repository contains solutions to various JavaScript coding challenges designed to practice fundamental programming concepts such as functions, arrays, dates, and logic implementation. Each problem includes the problem statement, a solution function, and example usage.
---
## Assignments Included
### 1. Return the Sum of Two Numbers
Create a function that takes two numbers as arguments and returns their sum.
Example:
```js
addition(3, 2) ➞ 5Write a function that takes the base and height of a triangle and returns its area.
Example:
triArea(3, 2) ➞ 3Write a function that takes an integer representing minutes and converts it to seconds.
Example:
convert(5) ➞ 300Write a function redundant that takes a string and returns a function that returns that string.
Example:
const f1 = redundant("apple");
f1() ➞ "apple"Create a function that returns the number of true values in a boolean array.
Example:
countTrue([true, false, true]) ➞ 2Write a function to compute the derivative of
Example:
derivative(3, -2) ➞ 12Create a function that takes an array of numbers and returns "Boom!" if any number contains the digit 7; otherwise, returns "there is no 7 in the array".
Example:
sevenBoom([1, 2, 3, 7]) ➞ "Boom!"Write a function that returns the total number of non-nested elements in a nested array.
Example:
getLength([1, [2, 3]]) ➞ 3Create a function that takes two dates and returns the number of days between them.
Example:
getDays(new Date("June 14, 2019"), new Date("June 20, 2019")) ➞ 6-
Ensure you have Node.js installed.
-
Run the script files using the command:
node <filename>.js
-
Check console output for results.
Created by Engr. Amarachi Crystal Omereife