a function combineWords(word1,word2) that displays both words

computer science


 Create a Web page that does the following. Write a function combineWords(word1,word2) that displays both words (i.e. the words in the parameters) in an alert box with a space between them. Be sure to place the function declaration in the head section of your document, inside script tags.

Then in the body section, add script tags and include JavaScript code that prompts the user to input two words. Store this input in two variables, word1 and word2. Then write a function call to combineWords, passing the value’s input to the functions. Hint: use concatenation inside the function to combine the words. 

Related Questions in computer science category

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.