Write a function that takes a string as an input and returns an array containing the
Write a function that takes a string as an input and returns an array containing the odd words. With the string: "I can sing bad songs while in the shower", the output in the alert should read: "I sing songs in shower". Below is the basic framework that you should use.
<script type="text/javascript">
var allWords = "I can sing bad songs while in the shower";
function getOddWords(words){
//place code here
return oddWords;
}
alert(getOddWords(allWords));
</script>