filmov
tv
5 - JavaScript Data types | JavaScript Tutorial for Beginners

Показать описание
JavaScript Data types:
JavaScript is a loosely typed or a dynamic language. Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types
let foo = 42; // foo is now a number
foo = 'bar'; // foo is now a string
foo = true; // foo is now a boolean
JavaScript variables can hold many data types: numbers, strings, objects and more…
What is the difference between null and undefined ?
JavaScript is a loosely typed or a dynamic language. Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types
let foo = 42; // foo is now a number
foo = 'bar'; // foo is now a string
foo = true; // foo is now a boolean
JavaScript variables can hold many data types: numbers, strings, objects and more…
What is the difference between null and undefined ?