@@ -66,26 +66,25 @@ Complete the following tasks and assign the results to the specified variables.
66
66
*/
67
67
68
68
//Starter Code
69
- let inputString = " Welcome to the Coding Bootcamp! Learn JavaScript today. " ;
70
-
69
+ let inputString = " Welcome to the Coding Bootcamp! Learn JavaScript today. " ;
71
70
// 1. Searching
72
- let hasJavaScript ; // Your code here
73
- let codingPosition ; // Your code here
74
- let startsWithWelcome ; // Your code here
75
- let endsWithToday ; // Your code here
71
+ let hasJavaScript = inputString . includes ( "JavaScript" ) ; // Your code here
72
+ let codingPosition = inputString . indexOf ( "Coding" ) ; // Your code here
73
+ let startsWithWelcome = inputString . startsWith ( "Welcome" ) ; // Your code here
74
+ let endsWithToday = inputString . endsWith ( "today." ) ; // Your code here
76
75
77
76
// 2. Transforming
78
- let lowercaseString ; // Your code here
79
- let uppercaseString ; // Your code here
80
- let trimmedString ; // Your code here
81
- let replacedString ; // Your code here
77
+ let lowercaseString = inputString . toLowerCase ( ) ; // Your code here
78
+ let uppercaseString = inputString . toUpperCase ( ) ; // Your code here
79
+ let trimmedString = inputString . trim ( ) ; // Your code here
80
+ let replacedString = inputString . replace ( "JavaScript" , "coding" ) ; // Your code here
82
81
83
82
// 3. Breaking Apart
84
- let wordsArray ; // Your code here
83
+ let wordsArray = inputString . split ( " " ) ; // Your code here
85
84
86
85
// 4. Retrieving
87
- let firstCharacter ; // Your code here
88
- let extractedBootcamp ; // Your code here
86
+ let firstCharacter = inputString . charAt ( 0 ) ; // Your code here
87
+ let extractedBootcamp = inputString . replace ( "Bootcamp" , "" ) // Your code here
89
88
90
89
// Log all results
91
90
console . log ( {
0 commit comments