OrderBy
is a sorter over a data set that passes the first and immediately next element of the data set to a lambda expression and returns a sorted data set based on the criteria of the lambda expression.
var sortedPencils = pencils.sort((previous, current) => { return previous.size > current.size ? 1 : 0; });