window.onload is an event handler in JavaScript that is executed when the entire web page, including all dependent resources like images and styles, has finished loading.
Initial Javascript for this problem is already written for you. Your task in this problem is to assign the change the text inside #randomText element using window.onload function.
| S. no | Problem |
|---|---|
| 1 | change the text "Initial stuff" to "What's up?" using window.onload function |
| Inside Script Tag | Instruction |
|---|---|
| define a function updateText(){ // follow instructions here } |
inside it select #randomText element |
| set the #randomText element's textContent to "What's up?" | |
| define a function updateText(){ // first two instructions written here } // this step comes here |
set window.onload = updateText |
Best of luck, developers!