To master something.. practice the fundamentals heavily.
Respect the building blocks, master the fundamentals and the potential is unlimited — PJ Ladd
A string can be any text inside double or single quotes/
- Are immutable. Once made, cannot be changed. However, you can make a new string by concatenating other strings with the ‘+’ operator.
- Strings are primitive values. Like Boolean, Number and Null. Strings are values of the String type.
- There exist String objects which can be used to store string values, but those String objects are not used in practice:
var newString = new String('foo'); // "object"| not used in practice
newString.indexOf('o'); // 1
var newStr = 'foo'; // "string", much used in practice.
newStr.indexOf('o'); // 1
A backslash (\) followed by a letter or by a combination of digits.
- \n New line.
- \” Double quote
- \’ . Single quote
- \t Tab.
- \/ Slash.
- \\ Backslash