File tree 1 file changed +5
-4
lines changed
stringing-characters-together/exercises 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
let language = 'JavaScript' ;
4
4
5
5
//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));
7
8
//2. Without using slice(), use method chaining to accomplish the same thing.
8
-
9
+ console . log ( language . at ( 0 ) + language . at ( 4 ) ) ;
9
10
//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 ] } '` ) ;
11
12
//4. Just for fun, try chaining 3 or more methods together, and then print the result.
12
13
13
14
//Part Three section Two
14
-
15
+ ``
15
16
//1. Use the string methods you know to print 'Title Case' from the string 'title case'.
16
17
17
18
let notTitleCase = 'title case' ;
You can’t perform that action at this time.
0 commit comments