Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created July 6, 2017 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/54ed337880166793177ccff1c3672e8f to your computer and use it in GitHub Desktop.
Save codecademydev/54ed337880166793177ccff1c3672e8f to your computer and use it in GitHub Desktop.
Codecademy export
/*jshint multistr:true */
var text = "Hey, how are you \
doing? My name is Kyle. Kyle enjoys coding, but more importently, Kyle likes talking in third person.";
var myName = "Kyle";
var hits = [];
for (var i = 0; i < text.length; i++); {
if (text[i] === "K") {
for (var j = i; j < myName.length + i; j++); {
hits.push(text[i]);}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment