Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 83507f2

Browse files
added indexOf()
1 parent 154e34d commit 83507f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎easy/0028 implement-strstr()/implement-strstr().js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ var strStr = function (haystack, needle) {
1919
return -1;
2020
};
2121

22-
// var strStr = function (haystack, needle) {
23-
// return haystack.indexOf(needle)
24-
// };
22+
var strStr = function (haystack, needle) {
23+
return haystack.indexOf(needle)
24+
};
2525

2626
console.log(strStr("hello", "ll"))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /