dev-resources.site
for different kinds of informations.
JS Data types (Ma'lumot turlari)
Published at
5/31/2024
Categories
datatypes
Author
muxiddin
Categories
1 categories in total
datatypes
open
Author
8 person written this
muxiddin
open
JavaScriptda ikkita asosiy ma'lumotlar turi mavjud: primitiv va no primativ turlarga bo'linadi.
- Primitiv Turlar
1. String
Matnli ma'lumotlarni ifodalaydi. Ikkita qo'shtirnoq ("...")
yoki bitta qo'shtirnoq ('...') ichida yoziladi.
yoki bektik (`...`) ichida yoziladi
misol:
let str = "Hello, World!";
let str = 'Hello, World!';
let str = `Hello, World!`;
2. Number
Butun va o'nlik (floating-point) sonlarni ifodalaydi.
misol:
let num = 42;
let pi = 3.14;
3. Boolean
Mantiqiy qiymatlar: true yoki false.
misol:
let isTrue = true;
let isFalse = false;
4. Null
Bitta qiymatni qabul qiladigan maxsus ma'lumot turi:
Null, Bu qiymat ob'ektning mavjud emasligini ifodalaydi.
Misol:
let emptyValue = null;
5. Undefined
O'zgaruvchiga hech qanday qiymat tayinlanmaganligini ifodalaydi.
Misol:
let notAssigned;
console.log(notAssigned); // undefined
6. Symbol
(ES6 dan boshlangan)
Yagona, o'zgarmas identifikatorlarni yaratish uchun ishlatiladi.
Misaol:
let sym = Symbol('description');
7. BigInt
(ES11 dan boshlangan)
Katta butun sonlarni ifodalaydi bu sonlar Number tipida
ifodalanishi mumkin bo'lgan diapazondan kattaroq bo'ladi.
Misol:
let bigIntNumber = BigInt(9007199254740991);
- No Primativ turlar
Object
Kalit-qiymat juftliklarini saqlash uchun ishlatiladi.
Ob'ektlar moslashuvchan va ko'p maqsadli bo'lib,
bir nechta xususiyatlarga ega bo'lishi mumkin.
Misol:
let person = {
name: "John",
age: 30
};
Array
Tartiblangan ro'yxat yoki kolleksiyani ifodalaydi.
Arraylar ob'ektning bir turi hisoblanadi.
Misol:
let numbers = [1, 2, 3, 4, 5];
Function
Funksiyalar ham ob'ekt turlariga kiradi.Funksiya
kod bo'lagini qayta ishlatish va bajarish uchun ishlatiladi.
Misol:
function greet(name) {
return "Hello, " + name;
}
Ma'lumotlar Turini Tekshirish
typeof
operatori yordamida o'zgaruvchining turini tekshirish mumkin:
datatypes Article's
30 articles in total
14. Longest Common Prefix - Using Trie
read article
Variables & Data types
read article
Handling Data in SQL: Signed vs. Unsigned Types
read article
Representação numérica na computação
read article
Understanding Floats in Python: Essential Tips and Examples
read article
Everything You Need to Know About Python Integers: Tips, Tricks, and Examples
read article
Understanding Python Data Types: A Comprehensive Guide
read article
Why I Revisited MS SQL Server Basics: A Deep Dive into String Data Types
read article
Understanding Data Types in JavaScript
read article
Disjoint Unions in C
read article
PYTHON-FUNDAMENTALS: CONSTANTS, VARIABLES AND DATA TYPES
read article
Understanding Your Data: The Essentials of Exploratory Data Analysis"
read article
Data Types of Typescript
read article
C# {Data Types except Int}
read article
Variables, Constants, Data Types, and Namespaces in C++
read article
Data Types in Python
read article
JS Data types (Ma'lumot turlari)
currently reading
Data Types
read article
C# da ratsional sonlar bilan ishlovchi (float, double, decimal) ma'lumot turlari
read article
Big Integer in Java
read article
Oracle Data Types: An Overview
read article
Understanding Float vs. Double in C and C++
read article
Data Types - Python
read article
The Art of Series Summation in C: Navigating Data Types, Casting Magic, and the Dance of Incrementation
read article
Understanding Why We Don't Use Pointers to change the value of the element in Slice Data Type in Go Lang!
read article
A step by step guide to Converting a Column to Date Data Type in a Dataset using R
read article
Choosing the Right Java Data Types
read article
Evolution of Ruby Data Types
read article
Composite Data types part 1
read article
Network Address Types in PostgreSQL. Why you need to know?
read article
Featured ones: