[Solved] Write a function firstWord, taking a string and returning the first word in that string. The first word are all characters up to the first space [closed]
There are several problems with your code: go and run is not a valid parameter declaration in the function header. There is confusion here with the parameter and the string value that you expect the function to be called with. In the function header you should list the parameter(s) with variable names. Since the function … Read more