File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- const minimum = 1 ;
1+ /* const minimum = 1;
22const maximum = 100;
33
44const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
@@ -7,3 +7,12 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
77// Try breaking down the expression and using documentation to explain what it means
88// It will help to think about the order in which expressions are evaluated
99// Try logging the value of num and running the program several times to build an idea of what the program is doing
10+ <<<<<<< Updated upstream
11+ =======
12+ console.log(num)*/
13+
14+ function greet ( timeOfDay , name = "edward" ) {
15+ console . log ( `Good ${ timeOfDay } , ${ name } .` ) ;
16+ }
17+ console . log ( `hello${ greet ( "12:00" ) } how are you?` )
18+ >>> > >>> Stashed changes
Original file line number Diff line number Diff line change 11// Predict and explain first...
22// =============> write your prediction here
3+ //"str" is not a valid variable name
34
45// call the function capitalise with a string input
56// interpret the error message and figure out why an error is occurring
67
78function capitalise ( str ) {
8- let str = `${ str [ 0 ] . toUpperCase ( ) } ${ str . slice ( 1 ) } ` ;
9+ let str = `${ str [ 0 ] . toUpperCase ( ) } ${ str . slice ( 1 ) } ` ;
910 return str ;
1011}
1112
12- // =============> write your explanation here
13+ // =============> write your explanation heres
1314// =============> write your new code here
15+ function capitalise ( str ) {
16+ let string1 = `${ str [ 0 ] . toUpperCase ( ) } ${ str . slice ( 1 ) } ` ;
17+ return string1 ;
18+ }
You can’t perform that action at this time.
0 commit comments