---
id: 69c5f3d787b1725d5f00c8b7
title: "Challenge 253: Acronym Finder"
challengeType: 28
dashedName: challenge-253
---

# --description--

Given a string representing an acronym, return the full name of the organization it belongs to from the list below:

- `"National Avocado Storage Authority"`
- `"Cats Infiltration Agency"`
- `"Fluffy Beanbag Inspectors"`
- `"Department Of Jelly"`
- `"Wild Honey Organization"`
- `"Eating Pancakes Administration"`

Each letter in the given acronym should match the first letter of each word in the organization it belongs to, in the same order.

# --hints--

`findOrg("NASA")` should return `"National Avocado Storage Authority"`.

```js
assert.equal(findOrg("NASA"), "National Avocado Storage Authority");
```

`findOrg("CIA")` should return `"Cats Infiltration Agency"`.

```js
assert.equal(findOrg("CIA"), "Cats Infiltration Agency");
```

`findOrg("FBI")` should return `"Fluffy Beanbag Inspectors"`.

```js
assert.equal(findOrg("FBI"), "Fluffy Beanbag Inspectors");
```

`findOrg("DOJ")` should return `"Department Of Jelly"`.

```js
assert.equal(findOrg("DOJ"), "Department Of Jelly");
```

`findOrg("WHO")` should return `"Wild Honey Organization"`.

```js
assert.equal(findOrg("WHO"), "Wild Honey Organization");
```

`findOrg("EPA")` should return `"Eating Pancakes Administration"`.

```js
assert.equal(findOrg("EPA"), "Eating Pancakes Administration");
```

# --seed--

## --seed-contents--

```js
function findOrg(acronym) {

  return acronym;
}
```

# --solutions--

```js
function findOrg(acronym) {
  const orgs = [
    "National Avocado Storage Authority",
    "Cats Infiltration Agency",
    "Fluffy Beanbag Inspectors",
    "Department Of Jelly",
    "Wild Honey Organization",
    "Eating Pancakes Administration"
  ];

  for (let org of orgs) {
    const initials = org
      .split(" ")
      .map(word => word[0])
      .join("");

    if (initials.toUpperCase() === acronym.toUpperCase()) {
      return org;
    }
  }

  return "not found";
}
```
