Guest User

Untitled

a guest
May 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. /*
  2. Типы данных в JS. Приведение типов
  3. */
  4.  
  5. // primitives
  6. const someString = 'some_string',
  7. someNumber = 12345,
  8. someBoolean = true,
  9. someUndefined = undefined,
  10. someNull = null;
  11.  
  12. // object
  13. const someObject = { a: 'a' };
  14.  
  15. typeof someString; // 'string'
  16. typeof someObject; // 'object'
  17. typeof null; // 'object' - language error
  18. typeof function() {}; // 'function'
Add Comment
Please, Sign In to add comment