Question: I'm trying to select dates bigger than in javascript function. My function return empty array and I don't know wher I'm doing mistake

```
var arr = ["2018-01-24T17:43:03.000Z","2018-01-25T17:43:03.000Z","2018-01-
26T17:43:03.000Z","2018-01-27T17:43:03.000Z"]
var biggerThanElements = arr.filter(x=>{
  x = new Date(x);
  element = new Date("2018-01-23T00:00:00.000Z");
  x > element
});

```

console.log(biggerThanElements)

Answer: 
You could just compare directly with [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) dates/time strings.

```js
var arr = ["2018-01-24T17:43:03.000Z", "2018-01-25T17:43:03.000Z", "2018-01-26T17:43:03.000Z", "2018-01-27T17:43:03.000Z"],
    biggerThanElements = arr.filter(x => x > "2018-01-23T00:00:00.000Z");

console.log(biggerThanElements);
```
You missed your return statement for change to `return x > element`

```js
var arr = ["2018-01-24T17:43:03.000Z","2018-01-25T17:43:03.000Z","2018-01-26T17:43:03.000Z","2018-01-27T17:43:03.000Z"]
var biggerThanElements = arr.filter(x=>{
  x = new Date(x);
  element = new Date("2018-01-23T00:00:00.000Z");
   return x > element
});
console.log(biggerThanElements)
```