File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1- // Predict and explain first...
2- // =============> write your prediction here
1+ / " h e l l o M h a i r i " = = = ` h e l l o $ { mhairiName } ` ;
2+ "${mhairiName} is 28" === `Mhairi is ${ mhairiAge } ` ;
33
4- // call the function capitalise with a string input
5- // interpret the error message and figure out why an error is occurring
4+ // My answer is:
5+ const mhairiName = "Mhairi" ;
6+ const mhairiAge = 28 ;
67
7- function capitalise ( str ) {
8- let str = `${ str [ 0 ] . toUpperCase ( ) } ${ str . slice ( 1 ) } ` ;
9- return str ;
10- }
8+ const sentence1 = `hello ${ mhairiName } ` ;
9+ console . log ( sentence1 ) ; // ➜ Output: hello Mhairi
1110
12- // =============> write your explanation here
13- // =============> write your new code here
11+
12+ const sentence = `${ mhairiName } is ${ mhairiAge } ` ;
13+ console . log ( sentence ) ; // ➜ Output: Mhairi is 28
You can’t perform that action at this time.
0 commit comments