Computer scienceProgramming languagesJavaScriptWorking with dataStrings

String transforming

Barking

Report a typo

You are training your dog to bark on command. Write a function that receives the number of times your dog should bark and returns a string containing that number of barks.

Sample Input 1:

3

Sample Output 1:

bark bark bark
Write a program in JavaScript
function speak(n) {
//write your code here
}
___

Create a free account to access the full topic