Question: I need to find a way to get the closest number divisible by three for a given number. As it's only the number three, and i was in a rush, i used if statements. I was wondering if there was a cleaner way of getting the same result?

<https://jsfiddle.net/>

```js
let indexes = [0, 9, 26, 39];

for (let i = 0, l = indexes.length; i < l; i++) {
  newIndex = indexes[i];
  if (!(newIndex % 3 == 0)) {
    if (((newIndex - 1) % 3 == 0)) {
      newIndex = (newIndex - 1);
    } else {
      if (((newIndex + 1) % 3 == 0)) {
        newIndex = (newIndex + 1);
      } else if (((newIndex + 2) % 3 == 0)) {
        newIndex = (newIndex + 2);
      } else if (((newIndex + 3) % 3 == 0)) {
        newIndex = (newIndex + 3);
      }
    }
  }
  console.log(newIndex);
}
```

---

```
input: 0
expected output: 0

input: 9
expected output: 9

input: 26
expected output: 27

input: 39
expected output: 39

```

Answer: 
On Unix-like operating systems, slash / is the separator in the 'pathname' of a file. So '/foo/bar' means the file 'bar' which is found in the directory 'foo'.

On Windows, the reverse slash \ is used for the same purpose. Though many Windows routines will understand both forms.

Use of reverse slash is made more complicated in some programming languages because those languages use \ as an 'escape' character with special meaning. To get a single literal \ you need to write \ \ (space added for clarity here).
* `.` means it's the current directory
* `/` is normally used in paths to show the structure of files and folders
* `\\` is referring to `\` (used double because `\` is a special character)
which is same as / but used differently depending on the OS