HF RL Explorer

Task: Extend JavaScript Array Sort to Accept Attribute Parameter

Task: Extend JavaScript Array Sort to Accept Attribute Parameter: a task in Terminal-Lego-15k (Harbor dataset). You need to create a JavaScript utility that extends or wraps the built-in Array.prototype.sort() functionality to allow sorting an array of objects by a specified attribute name…

The task

You need to create a JavaScript utility that extends or wraps the built-in `Array.prototype.sort()` functionality to allow sorting an array of objects by a specified attribute name, without writing a custom sort function for each attribute.

Part of PrimeIntellect/Terminal-Lego-15k.