Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Типы данных в JS. Приведение типов
- */
- // primitives
- const someString = 'some_string',
- someNumber = 12345,
- someBoolean = true,
- someUndefined = undefined,
- someNull = null;
- // object
- const someObject = { a: 'a' };
- typeof someString; // 'string'
- typeof someObject; // 'object'
- typeof null; // 'object' - language error
- typeof function() {}; // 'function'
Add Comment
Please, Sign In to add comment