Skip to content

Commit bfa9849

Browse files
author
Edward King
committed
Part 3 In Progress
1 parent d7e27ee commit bfa9849

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stringing-characters-together/exercises/part-three.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
let language = 'JavaScript';
44

55
//1. Use string concatenation and two slice() methods to print 'JS' from 'JavaScript'
6-
6+
language = 'JavaScript';
7+
//console.log(language.slice(0,1)+language.slice(4,5));
78
//2. Without using slice(), use method chaining to accomplish the same thing.
8-
9+
console.log(language.at(0) + language.at(4));
910
//3. Use bracket notation and a template literal to print, "The abbreviation for 'JavaScript' is 'JS'."
10-
11+
console.log(`The abbreviation for 'JavaScript' is '${language[0]}${language[4]}'`);
1112
//4. Just for fun, try chaining 3 or more methods together, and then print the result.
1213

1314
//Part Three section Two
14-
15+
``
1516
//1. Use the string methods you know to print 'Title Case' from the string 'title case'.
1617

1718
let notTitleCase = 'title case';

0 commit comments

Comments
 (0)