Data Types in JavaScript
Data Types
JavaScript data type refers to the types of values a program can work with.
Different data types in JavaScript are:-
- numbers
- strings
- arrays
- boolean
- objects
JavaScript String Explanation:-
In JavaScript, we can use strings to store and manipulate text. A string can be any text wrapped in quotes. If the wrapped quotes and quotes inside the string are the same then we have to use the backslash (\) escape character. For example,
var my_string = 'Hello! I\'m JS Developer';
Important special escape Characters are:-
- \' => Single Quote
- \" => Double Quote
- \\ => Backslash
- \n => New Line
- \t => Tab
- \b => Backspace
- \f => Form feed