This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const arrayOfObjects = [{name: "Foo", ranking: 4.5}, {name: "Bar", ranking: 4}, {name: "Baz", ranking: 3.4}] | |
| // getOrderedObjectsByRanking returns the objects ordered by ranking | |
| const getOrderedObjectsByRanking = (array = arrayOfObjects) => array.sort((a,b) => (a.ranking > b.ranking) ? 1 : -1) | |
| // getAverageRanking returns the average ranking | |
| const getAverageRanking = (array = arrayOfObjects) => array.reduce((acc, curr) => acc + curr.ranking, 0) / arrayOfObjects.length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Extract TestLink Values from http://www.wvtesting.com/level2/InvlalidUrls-L2.html | |
| Usage: | |
| - Copy and paste this method into your browser js console, then run it: | |
| > getInvalidURLs() | |
| */ | |
| function getInvalidURLs() { | |
| const tBody = document.getElementsByClassName("uri-format") |