File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -69,23 +69,23 @@ Complete the following tasks and assign the results to the specified variables.
69
69
let inputString = " Welcome to the Coding Bootcamp! Learn JavaScript today. " ;
70
70
71
71
// 1. Searching
72
- let hasJavaScript ; // Your code here
72
+ let hasJavaScript = inputString . includes ( "JavaScript" ) ; // Your code here
73
73
let codingPosition ; // Your code here
74
74
let startsWithWelcome ; // Your code here
75
75
let endsWithToday ; // Your code here
76
76
77
77
// 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
78
+ let lowercaseString = inputString . toLowerCase ( ) ; // Your code here
79
+ let uppercaseString = inputString . toUpperCase ( ) ; // Your code here
80
+ let trimmedString = inputString . trim ( ) ; // Your code here
81
+ let replacedString = inputString . replace ( "JavaScript" , "coding" ) ; // Your code here
82
82
83
83
// 3. Breaking Apart
84
- let wordsArray ; // Your code here
84
+ let wordsArray = inputString . split ( " " ) ; // Your code here
85
85
86
86
// 4. Retrieving
87
- let firstCharacter ; // Your code here
88
- let extractedBootcamp ; // Your code here
87
+ let firstCharacter = trimmedString . charAt ( 0 ) ; // Your code here
88
+ let extractedBootcamp = inputString . slice ( inputString . indexOf ( "B" ) , inputString . indexOf ( "!" ) ) ; // Your code here
89
89
90
90
// Log all results
91
91
console . log ( {
You can’t perform that action at this time.
0 commit comments