-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmutationfcc.js
71 lines (48 loc) · 1018 Bytes
/
mutationfcc.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
function mutation(array)
{
let i,j;
let arr1 =[];
let arr2 =[];
let elementone, elementtwo;
arr1.push(array[0]);
arr2.push(array[1]);
//console.log(arr1,arr2);
for(i=0;i<arr1.length;i++)
{
for(j=0;j<arr1[i].length;j++)
{
elementone = arr1[i][j];
//console.log(elementone);
// console.log(arr1[i][j]);
}
}
for(i=0;i<arr2.length;i++)
{
for(j=0;j<arr2[i].length;j++)
{
elementtwo = arr2[i][j];
// console.log(arr2[i][j]);
//console.log(elementtwo);
}
}
if(elementone == elementtwo)
{
console.log("true");
}
else
{
console.log("false");
}
}
mutation(["hello", "hey"]);
mutation(["hello", "Hello"]);
mutation(["zyxwvutsrqponmlkjihgfedcba", "qrstu"]);
mutation(["Mary", "Army"]);
mutation(["Mary", "Aarmy"]);
mutation(["Alien", "line"]);
mutation(["floor", "for"])
mutation(["hello", "neo"])
mutation(["voodoo", "no"])
mutation(["ate", "date"])
mutation(["Tiger", "Zebra"])
mutation(["Noel", "Ole"])