Skip to content

Commit 1e5d5da

Browse files
committed
again sart with js string
1 parent 8adc89a commit 1e5d5da

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

array-exists.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11

22
function bestfriends(friends){
3-
const max = friends[0];
4-
for(let friend of friends){
5-
// console.log(friend);
3+
let max = friends[0];
4+
for(const friend of friends){
65
if(friend.length>max.length){
76
max = friend;
87
}
98
}
109
return max;
1110
}
12-
const friendsName =bestfriends(['farhana','nimki','adrita','tirtho']);
11+
const friendsName =bestfriends(['farhana','nimki','adrita','tirtho','turkiministhan']);
1312
console.log(friendsName);
1413

1514

string-search.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ console.log(output); */
5050
console.log(output); */
5151

5252

53-
for(const product of products){
53+
/* for(const product of products){
5454
// console.log(product);
5555
if(product.toLocaleLowerCase().indexOf(search.toLowerCase()) != -1){
5656
output.push(product)
5757
}
5858
console.log(output);
59-
}
59+
} */
6060

6161

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy