Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

String.repeat()

function doubleString(string) {
  return string.repeat(2);
}

// Should return 'echoecho'
console.log("doubleString('echo') returns: " + doubleString("echo"));
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+9 =