File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Methods Extended Studies/Array Methods Extended Study Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1414//
1515// EXAMPLES //////////////////////////////////////////////////////////////////////////////////////////////////
1616//
17- // EXAMPLE 1:
17+ // EXAMPLE 1: Create a function that determines if a string starts with a certain character.
1818//
1919// RESOURCES /////////////////////////////////////////////////////////////////////////////////////////////////
2020//
2121//
2222//
2323//////////////////////////////////////////////////////////////////////////////////////////////////////////////
24+
25+ // EXAMPLE 1: Create a function that determines if a string starts with a certain character.
26+
27+ const myString = "This is a string" ;
28+
29+ function findFirstLetters ( string , input ) {
30+ const firstLetters = string . startsWith ( input ) ;
31+ console . log ( firstLetters ) ;
32+ }
33+
You can’t perform that action at this time.
0 commit comments