Question: I know you might close this now, but please listen. I am making an extension with `jquery`. Here is my `manifest.json`:

```
{
   "manifest_version":2,
   "name":"Ad Killer",
   "description":"A Basic program for blocking ads",
   "version":"0.1",
   "background":{
      "scripts":[
      ]
   },
   "content_scripts":[
     {
        "matches":[
        "<all_urls>"
        ],
        "js":[
           "content.js", 
           "jquery.js"
        ]
     }
  ],
  "browser_action":{
     "default_icon":"ad128.png",
     "default_title":"Ad Killer"
   }
}

```

Here is my `jquery.js`:

```
src="http://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"

```

and finally my `content.js`:

```
src="http://code.jquery.com/jquery-3.1.1.min.js"

$(document).onload(function() {
    alert('It Works!!')
});

var elems = document.getElementsByTagName("iframe");

for (var i = 0, max = elems.length; i < max; i++) {
    elems[i].hidden = true;
};

```

The problem is that every time I run this, it gives me the error `$ is not defined`, but I have already initialised JQuery. What am I doing wrong here? Any help would be appreciated.

Answer: 
Simple approach according to [this question](https://stackoverflow.com/questions/1155617/count-occurrence-of-a-character-in-a-string):

```
x = input("Enter the text that you need me to count how many (a,e,i,o,u) are in it:")

print("There were", x.count('a'), "'a's")
print("There were", x.count('e'), "'e's")
print("There were", x.count('i'), "'i's")
print("There were", x.count('o'), "'o's")
print("There were", x.count('u'), "'u's")

```
Instead of `5` variables for counting and `5` constant for comparing use the dictionary:

```
h = {105: 0, 111: 0, 97: 0, 117: 0, 101: 0}

```

or - nicer -

```
h = {'i': 0, 'o': 0, 'a': 0, 'u': 0, 'e': 0}

```

so your full code will be

```
x = input("Enter the text that you need me to count how many (a,e,i,o,u) in it: ")
h = {'i': 0, 'o': 0, 'a': 0, 'u': 0, 'e': 0}

for i in x:              # there is no need to index characters in the string
    if i in h:
      h[i] += 1

for char in h: 
    print("There were {} '{}'s".format(h[char], char))  

```