Js Veri Tipleri (Data Types)
JavaScript’de Toplam 8 adet veri tipi vardir. Bunlarin 7 adedi primitive (ilkel) dedigimiz veri tiplerinden olusur.
Primitives Veri Tipleri
- Boolean. true and false.
- null. A special keyword denoting a null value. (Because JavaScript is case-sensitive, null is not the same as Null, NULL, or any other variant.)
- undefined. A top-level property whose value is not defined.
- Number. An integer or floating point number. For example: 42 or 3.14159.
- BigInt. An integer with arbitrary precision. For example: 9007199254740992n.
- String. A sequence of characters that represent a text value. For example: “Howdy”.
- Symbol. A data type whose instances are unique and immutable.
ve gelismis veri tipi olarak:
- Object
** Object veri tipleri sunlari icerebilir;**
- An object
- An array
- A date
Ornek;
// Numbers:let length = 16;let weight = 7.5;
// Strings:let color = "Yellow";let lastName = "Johnson";
// Booleanslet x = true;let y = false;
// Object:const person = {firstName:"John", lastName:"Doe"};
// Array object:const cars = ["Saab", "Volvo", "BMW"];
// Date object:const date = new Date("2022-03-25");