Captain

Report a typo

Define a function that will add the word captain before the name of a person. There should be one space after the word captain.

The function should be named captainAdder and accept one parameter name as an argument.

The function should return a string, not print it to the console.

Sample Input 1:

Jack Sparrow

Sample Output 1:

captain Jack Sparrow
Write a program in JavaScript
// write your code here
___

Create a free account to access the full topic