Sort an array according to a property which may be null
问题 I ve an array of objects : let items = [ { name: 'eric', value: 1 }, { name: 'bob', value: 4 }, { name: 'michael', value: 0 }, { name: 'john', value: 3 }, { name: 'brad', value: null }, { name: 'martin', value: 2 }, { name: 'chris', value: null } ]; i want to sort my array so that the objects can be sorted by the "value" attribute , and if it's null , make the object in the bottom of the array : { name: 'michael', value: 0 }, { name: 'eric', value: 1 }, { name: 'martin', value: 2 }, { name: