Skip to content

Commit b783cc7

Browse files
authored
Create stringCheck.js
1 parent 8c867da commit b783cc7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
function stringCheck(arr){
2+
let string1=arr[0].toLowerCase()
3+
let string2=arr[1].toLowerCase()
4+
let flag=0
5+
for (let i=0 ; i<string2.length;i++){
6+
if(!string1.includes(string2[i])){
7+
8+
flag+=1
9+
}
10+
}
11+
12+
if(flag>0){
13+
return false
14+
}else{
15+
return true
16+
}
17+
}

0 commit comments

Comments
 (0)