Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 -> 2 -> 3 -> 4 -> 5
- {
- value: 1,
- next: {
- value: 2,
- next: {
- value: 3,
- next: {...}
- }
- }
- }
- let array = [];
- array.push({ type: "banana", price: 70 });
- array.push({ type: "apple", price: 100 });
- let banana = array.find( item => item.type === "banana" );
- console.log( banana );
- console.log( array.sort( ( a, b ) => a.price < b.price ) );
Add Comment
Please, Sign In to add comment