```
function convertToInteger(str) {
return parseInt("56");
return parseInt("77");
return parseInt("JamesBond");
}
```

So this just doesn’t make sense.

- The point of this is that you have a function
`convertToInteger`

which takes *any* string and tries to convert it to an integer.
- If programming worked in that you had to define every possible return value: for this basic function, for
*valid* inputs you have every possible variation of every unicode character (basically every language + symbols, emojis etc) of any length.
**Tests are just to check that your code works, the purpose of them is not for you to write code that only returns the values in the tests.**
- The function takes an argument, called
`str`

, that in your code you never use.
- You can return
**one** thing from a function.

To go back to functions in general:

```
function self(x) {
return x;
}
```

This function takes an argument and returns that argument.

```
self(2) // returns 2
self('hi') // returns 'hi'
```

The function is defined like this, you give the function a value and it returns a value:

```
function self(x) {
return x;
}
```

It **isn’t** defined like this:

```
function self(x) {
return 2;
return 'Hi';
}
```