Closed odv closed 4 years ago
function wordCounter (input) {
console.log(`Character count is ${input.length}.`);
console.log(`Word count is ${input.split(" ").length}.`);
}
function wordCounter3 (input) {
console.log(`Character count is ${input.length}. \nWord count is ${input.split(" ").length}.`);
}
Function should accept a string and return back two strings:
Character count: x
where x is the actual number of characters in a stringWord count: x
where x is the actual number of words in a string