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.
Get Free Quote!
381 Experts Online