Here you can find all the free questions related with Salesforce Certified JavaScript Developer (JS-Dev-101) exam. You can also find on this page links to recently updated premium files with which you can practice for actual Salesforce Certified JavaScript Developer Exam. These premium versions are provided as JS-Dev-101 exam practice tests, both as desktop software and browser based application, you can use whatever suits your style. Feel free to try the Salesforce Certified JavaScript Developer Exam premium files for free, Good luck with your Salesforce Certified JavaScript Developer Exam.
Question No: 1
MultipleChoice
Given the HTML below:
Universal Containers
Applied Shipping
Burlington Textiles
Which statement adds the priority-account CSS class to the Applied Shipping row?
Options
Answer BExplanation
document.querySelector('#row-as') returns the single element with id row-as.
That element has a classList property with add, remove, etc.
A: querySelectorAll returns a NodeList, not a single element, so it does not have a classList property.
C: DOM elements do not have a classes array or push; they have classList.
D: document.getElementById('row-as') is fine to get the element, but there is no addClass method in standard DOM; that's a jQuery-style API, not vanilla JS.