find all of array which satisfy condition javascript

JavaScript
myArray.filter(x => x > 5)
Source

Also in JavaScript: