File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- // strings_methods&properties.js
2
-
3
- // INFO: String Methods & Properties in JavaScript
4
-
5
1
/*
2
+ INFO: String Methods & Properties in JavaScript
3
+
6
4
Strings in JavaScript are sequences of characters and are indexed starting from 0.
7
5
This means you can access individual characters using bracket notation.
8
6
@@ -14,8 +12,10 @@ Example:
14
12
let message = "Hello World" ;
15
13
console . log ( message [ 4 ] ) ; // Output: o
16
14
17
- // Properties
18
- // NOTE: The main property of strings is 'length' which returns the number of characters in the string.
15
+ /*
16
+ NOTE: Properties
17
+ The main property of strings is 'length' which returns the number of characters in the string.
18
+ */
19
19
console . log ( message . length ) ; // Output: 11
20
20
21
21
// INFO: Methods without arguments
You can’t perform that action at this time.
0 commit comments