-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
34 lines (30 loc) · 652 Bytes
/
Copy pathapp.js
File metadata and controls
34 lines (30 loc) · 652 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
var updateArrayItems = function (x) {
var newArr = x.map(function(item){
return {key: item}
});
console.log(newArr);
}
var filterNumbers = function(x) {
var newArr2 = x.filter(function(item) {
//return isNaN(item) ? false : item;
return !isNaN(item);
});
console.log(newArr2);
}
var createStringItems = function (arr,str) {
var newArr3=[];
arr.forEach(function(item){
var innerArr=[];
for(i=0;i<item;i++) {
innerArr.push(str);
}
newArr3.push(innerArr);
});
console.log(newArr3);
}
var checkingFurkan = function (arr) {
var answer = arr.some(function (item) {
return item === "furkan";
});
console.log(answer);
}