<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<h1>BLAH BLAH BLAH BLAH BLAH BLAH Cat BLAH BLAH Cat BLAH BLAHBLAH BLAH Cat</h1>
<br>
<button type="button" onclick="textname()">Call Ask</button>
<br><br>
<div id="result"></div>
</body>
</html>
//Search Text for Your Name
/*jshint multistr:true */
function textname(){
var text = "BLAH BLAH BLAH BLAH BLAH BLAH Cat BLAH BLAH Cat BLAH BLAHBLAH BLAH Cat"
var myName = "Cat";
var hits = [] ;
for(var i = 0 ; i < text.length ; i++){
if(text[i] === 'C'){
for(var b = i ; b < (myName.length + i) ; b++){
hits.push(text[b]);
}
}
}
document.getElementById('result').innerHTML = hits;
}
/* Styles go here */