Skip to content

Commit 7400f42

Browse files
committed
completes 6th (firstCharacters) test
1 parent 6850b94 commit 7400f42

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/strings.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ function firstCharacter (string) {
1919
};
2020

2121
function firstCharacters (string, n) {
22-
// your code here
22+
let newString = "";
23+
for (let i = 0; i < n; i++) {
24+
newString += string[i];
25+
}
26+
return newString;
2327
};
2428

2529
module.exports = {

0 commit comments

Comments
 (0)