The task is to create a JavaScript selection engine i.e. a JavaScript function that will return DOM elements given a CSS selector.
The test contains 3 files
- Test.html contains the HTML your function will be tested on
- Test.js contains a function which will provide results for your answer in the developer console
- Answer.js contains a template function that you should change and submit once you have finished
- You should only modify and submit Answer.js
- You may not use any JavaScript libraries
- document.querySelector/document.querySelectorAll may not be used
Open Test.html in a web browser (IE8+, Chrome, Firefox or Safari) and check the developer console for the test results. The template Answer.js should show 1 of 7 tests passed (as one of the answers should be an empty array)