---
id: 69bc6cb30c1d112a2e110a03
title: "Challenge 246: Name Initials"
challengeType: 28
dashedName: challenge-246
---

# --description--

Given a full name as a string, return their initials.

- Names to initialize are separated by a space.
- Initials should be made uppercase.
- Initials should be separated by dots.

For example, `"Tommy Millwood"` returns `"T.M."`.

# --hints--

`getInitials("Tommy Millwood")` should return `"T.M."`.

```js
assert.equal(getInitials("Tommy Millwood"), "T.M.");
```

`getInitials("Savanna Puddlesplash")` should return `"S.P."`.

```js
assert.equal(getInitials("Savanna Puddlesplash"), "S.P.");
```

`getInitials("Frances Cowell Conrad")` should return `"F.C.C."`.

```js
assert.equal(getInitials("Frances Cowell Conrad"), "F.C.C.");
```

`getInitials("Dragon")` should return `"D."`.

```js
assert.equal(getInitials("Dragon"), "D.");
```

`getInitials("Dorothy Vera Clump Haverstock Norris")` should return `"D.V.C.H.N."`.

```js
assert.equal(getInitials("Dorothy Vera Clump Haverstock Norris"), "D.V.C.H.N.");
```

# --seed--

## --seed-contents--

```js
function getInitials(name) {

  return name;
}
```

# --solutions--

```js
function getInitials(name) {
  return name.split(' ').map(word => word[0].toUpperCase() + '.').join('');
}
```
