Concept explainers
(a)
To declare the keyWordListItem variable, which will store li element.
(b)
To declare the variable named keyWordLink which will store an element ‘a’.
(c)
To change the innerHTML of the element keyWordLink and set the value of keyWordLink element to the value of the text of [j]th position of the keyWords array.
(d)
To declare a variable linkID containing the id returned by the parameterized function replaceWS( ) which is using the id of the [j]th position of the array keyWords as its parameter.
(e)
To change the href attribute of the variable keyWordLink to ‘keyWord_linkID” where linkID is the value of the linkID variable.
(f)
To append the keyWordLink to keyWordList variable and then append keyWordList to the above created ordered list.
Want to see the full answer?
Check out a sample textbook solutionChapter 12 Solutions
New Perspectives on HTML5, CSS3, and JavaScript
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning