-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasicfunctions.js
More file actions
45 lines (34 loc) · 808 Bytes
/
basicfunctions.js
File metadata and controls
45 lines (34 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function multiples(multipleOf, max) {
let multiplesOfArray =[]
for (let i=1; i<=max; i++) {
if (i % multipleOf === 0) {
multiplesOfArray.push(i)
}
}
return multiplesOfArray
}
export function smallerNumber(firstNumber, secondNumber){
let thesmallerNumber=0;
if (firstNumber < secondNumber) {
thesmallerNumber= firstNumber;
}
else{
thesmallerNumber = secondNumber;
}
return thesmallerNumber;
}
function commonDivisor(firstNumber, secondNumber) {
let commonDivisor=[];
}
function reduceDuplicates (firstArray, secondArray) {
}
function addArray(theArray) {
let total=0
for (let i=0; i<theArray.length;i++){
total +=i;
}
return total;
}
export function test(){
console.log("working");
}