DEV Community

BekmuhammadDev
BekmuhammadDev

Posted on • Edited on

1 1 1 1 1

JS Versialari haqida: JS Data types: Variables (O'zgaruvchilar):

JS Versialari:

JavaScript tilli dasturlash tili bo'lib, u zamonaviy veb dasturlashning asosi hisoblanadi. JavaScript versiyalari haqida gap ketganda, asosiy e'tibor ECMAScript (ES) standartlariga qaratiladi, chunki bu JavaScript tilining spetsifikatsiyasi hisoblanadi. ECMAScript va JavaScript ko'pincha bir xil deb tushuniladi, lekin ECMAScript standartni bildiradi, JavaScript esa shu standart asosida ishlab chiqilgan til.

JavaScriptning asosiy versiyalari quyidagilardan iborat:

ECMAScript (ES) versiyalari
ES1 (ECMAScript 1) - 1997 yil
Birinchi standart versiyasi, asosiy til xususiyatlari belgilandi.

ES2 (ECMAScript 2) - 1998 yil
Kichik o'zgarishlar va moslikni yaxshilash uchun standart yangilandi.

ES3 (ECMAScript 3) - 1999 yil
Ko'plab yangi xususiyatlar qo'shildi, masalan, oddiy regex qo'llab-quvvatlash va uchlik shart operatori (ternary operator).

ES4 (ECMAScript 4) - Bekor qilingan
Juda keng qamrovli va murakkab edi, shuning uchun hech qachon rasmiy nashr qilinmagan.

ES5 (ECMAScript 5) - 2009 yil
Strict mode, JSON, Array va Object funksiyalarining kengaytirilishi, shuningdek, yangi metodlar qo'shildi.

ES6 (ECMAScript 2015) - 2015 yil
Katta yangilanish. Let va const, class, arrow funksiyalar, template stringlar, promises, generators va modullar kabi ko'plab yangi xususiyatlar qo'shildi.

ES7 (ECMAScript 2016) - 2016 yil
Exponentiation operator (**) va Array.prototype.includes metodlari kiritildi.

ES8 (ECMAScript 2017) - 2017 yil
Async/await, Object.values, Object.entries, string padding va boshqalar qo'shildi.

ES9 (ECMAScript 2018) - 2018 yil
Asynchronous iteration, rest/spread operatorlari objectlar uchun, Promise.finally va boshqa xususiyatlar.

ES10 (ECMAScript 2019) - 2019 yil
Object.fromEntries, string trimming funksiyalari, Array.prototype.flat va flatMap, Symbol.description kabi xususiyatlar qo'shildi.
ES11 (ECMAScript 2020) - 2020 yil

Dynamic import, BigInt, nullish coalescing operator (??), optional chaining (?.), globalThis va boshqalar.

ES12 (ECMAScript 2021) - 2021 yil
Logical assignment operators, numeric separators, WeakRefs, Promise.any va boshqalar.

ES13 (ECMAScript 2022) - 2022 yil
Top-level await, at() metodi, class fields va private methods, static blocks.

JS Data type:

8 ta ma'lumot turi
2 ta gurhuga bo'linadi ( primative & non primative )

PRIMATIVE :

  1. string
  2. number
  3. boolean
  4. undefined
  5. null
  6. bigInteger
  7. Symbol

COMPLEX

  1. object ( array , object , function , new Class ):


1.string:
let str = "string"
let str1 =
string`
ket str2 = 'string'

`

  1. Number

11 , 0.11 , -1222 , 31/56 0.00001 number

var num=12;
console.log("10"/"5")
console.log(typeof (num/"a"));

  1. Boolean

true , false

var bool=true; // true=1 / false=0

console.log(bool+"string");

console.log(typeof bool+"0")

  1. undefined

var myArray

console.log(myArray+true)

console.log(typeof (myArray+true))

  1. null

var myNull = null;

0 or null

console.log(myNull-"myNull");

  1. BigInteger

var myBigInteger = 1222222222222222222222222222n;

console.log(typeof myBigInteger);

var myBigInteger=BigInt(1111111);

console.log(typeof myBigInteger)

  1. Symbol

var a=Symbol("hello");
var b=Symbol("hello");;

console.log(a,b)
console.log(a==b)

VARIABLES ( var , let , const);

  1. var (elon qilamiz , qayta elon qila olamiz , qayta qiymat tayinlaymiz) var a=12; var a=13; a=14;
  2. let

let b=21;
let b=22; x qayata elon qilaolmaymiz.
b=23; // qayta qiymat tayinlasak bo'ladi.

console.log(b)

  1. const (elon qilamiz , qayta elon qila olmaymiz , qayta qiymat tayinlay olmaymiz)

const d=32;
const c=32;
c++
const c=33;
c=34; // qayta qiymat tayinlay olmaymiz.
console.log(c)
console.log(d)

{
var a=33;
console.log(a)
}

let a=23;
let b=a;
b+=a; b=b+a; -> b=23+23
b+=a;

console.log(b)

let c=b;
console.log(a,b,c);

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay