Diyorbek.dev | πŸ‘¨πŸ»β€πŸ’»
379 subscribers
299 photos
35 videos
9 files
119 links
Allohga taqvo qiling. Va Alloh sizga ilm beradi. [2:282]


Software engineer @ OctaneJS Core Team

Dasturchi, jiddiy, kamgap, oddiy inson


Γ’zim haqimda kΓ²proq ma'lumot uchun: @Diyorbek_juraev_blog

Web sahifam: https://mrdiyorbek.uz/
Download Telegram
What is JSON and its common operations?

JSON (JavaScript Object Notation)


JSON
is a text-based data format following JavaScript object syntax, which was popularized by Douglas Crockford. It is useful when you want to transmit data across a network and it is basically just a text file with an extension of .json, and a MIME type of application/json

Parsing: Converting a string to a native object
JSON.parse(text);


Stringification: converting a native object to a string so it can be transmitted across the network
JSON.stringify(object);


β–ͺ️ JSON is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate.
β–ͺ️ It is often used to transmit data between a server and web application, as well as to store configuration data.
β–ͺ️ The data in JSON is represented as key-value pairs, similar to objects in JavaScript


@Diyorbekk_dev
πŸ‘2
Shu joylayrni soΔ£indim!

Ajoyib damlar bo'lgandi! 😊

@Diyorbekk_dev
πŸ‘5❀3
What is the purpose of the array slice method?

The slice() method in JavaScript is a powerful tool when working with arrays. Its main purpose is to extract a portion of an array and return it as a new array, without modifying the original array.

Selection of Elements:
The method takes one or two arguments. The first argument is the starting index from which elements will be selected.
The second argument (optional) is the ending index (exclusive) up to which elements will be selected. If this argument is not provided, the selection continues until the end of the array.


Creating a New Array:
The selected elements are then returned as a new array. This means that the original array remains unchanged.

Non-Destructive Operation:
Importantly, the slice() method does not modify the original array. This is crucial when you want to work with subsets of an array without altering the source data.

One Step ahead of the best✊

@Diyorbekk_dev
⚑1πŸ‘1
What is the difference between slice and splice?

One Step ahead of the best✊

@Diyorbekk_dev
πŸ‘1
How do you compare Object and Map?

1) Keys:
Objects: Keys are limited to Strings and Symbols.
Maps: Keys can be any value, including functions, objects, and primitives.

2) Order:

Objects: Keys have no guaranteed order.
Maps: Keys are ordered based on insertion sequence.

3) Size:
Objects: Size must be determined manually.
Maps: Size can be easily obtained using the size property.

4) Iteration:
Objects: Require manual key extraction for iteration.
Maps: Are directly iterable.

5) Prototype:
Objects: Have a prototype, which may lead to unintended key collisions.
Maps: Provide a clean alternative without a prototype.


Performance:

6) Maps: May perform better in scenarios involving frequent addition and removal of key-value pairs.

In conclusion, Maps offer more flexibility, ordering, and ease of use, especially for scenarios involving iteration and frequent modifications.

One Step ahead of the best✊

@Diyorbekk_dev
⚑1β˜ƒ1
What is the difference between == and === operators?

JavaScript provides both strict(===, !==) and type-converting(==, !=) equality comparison. The strict operators take type of variable in consideration, while non-strict operators make type correction/conversion based upon values of variables. The strict operators follow the below conditions for different types,

1) Two strings are strictly equal when they have the same sequence of characters, same length, and same characters in corresponding positions.

2) Two numbers are strictly equal when they are numerically equal. i.e, Having the same number value.

There are two special cases in this,

β–ͺ️ NaN is not equal to anything, including NaN.
β–ͺ️ Positive and negative zeros are equal to one another.


3) Two Boolean operands are strictly equal if both are true or both are false.

4) Two objects are strictly equal if they refer to the same Object.

5) Null and Undefined types are not equal with ===, but equal with ==. i.e, null===undefined --> false but null==undefined --> true


One Step ahead of the best✊

@Diyorbekk_dev
❀‍πŸ”₯1β˜ƒ1πŸ‘1
It is the example for the previous post!

❗️ Please, Note all information!


Possibly, We are gonna do interview from JavaScript with you!

@Diyorbekk_dev
❄️ Hello winter!

@Diyorbekk_dev
❀‍πŸ”₯7
What are lambda or arrow functions?

1) Shorter Syntax:
Arrow functions offer a compact syntax compared to function expressions.

2) No "this" Binding:
Arrow functions inherit the this value from the enclosing scope, eliminating their own this context.

3) No "arguments" or "super" Binding:
Arrow functions do not have their own arguments or super references.

4) Best for Non-Method Functions:
Well-suited for standalone functions, not ideal for object methods.

5) Implicit Return:
If the function body is a single expression, curly braces and return can be omitted.

6) No "new.target" Binding:
Arrow functions lack a new.target binding and cannot be used as constructors.

@Diyorbekk_dev
Module 1. Channel Contents

The First Step In JavaScript.
βž–βž–βž–βž–βž–βž–βž–
isNaN(Biladiganlar bormi?πŸ˜‰ )
βž–βž–βž–βž–βž–βž–βž–
toPrecision() in JavaScript?
βž–βž–βž–βž–βž–βž–βž–
~~ operator in JavaScirpt?
βž–βž–βž–βž–βž–βž–βž–
Truthy and Falsy elementlar
βž–βž–βž–βž–βž–βž–βž–
5 Scopes in JavaScript!
βž–βž–βž–βž–βž–βž–βž–
Array Methods!
βž–βž–βž–βž–βž–βž–βž–
"Trailling" or "Hanging" comma.
βž–βž–βž–βž–βž–βž–βž–
Memory management in JavaScript!
βž–βž–βž–βž–βž–βž–βž–
Asynchronous JavaScript (promises, callbacks, async/await)
βž–βž–βž–βž–βž–βž–βž–
reCuptcha
βž–βž–βž–βž–βž–βž–βž–
Feature-Sliced Design (FSD)
βž–βž–βž–βž–βž–βž–βž–
Git stash
βž–βž–βž–βž–βž–βž–βž–
What is Docker?
βž–βž–βž–βž–βž–βž–βž–
JavaScript info Books 1, 2, 3
βž–βž–βž–βž–βž–βž–βž–
Generator funktsiyalari!
βž–βž–βž–βž–βž–βž–βž–
Intl.NumberFormat
βž–βž–βž–βž–βž–βž–βž–
Absolute or Relative URLs?
βž–βž–βž–βž–βž–βž–βž–
(HOW JAVASCRIPT WORKS) EXECUTION CONTEXT!
βž–βž–βž–βž–βž–βž–βž–
JavaScript engine!
βž–βž–βž–βž–βž–βž–βž–
What are the possible ways to create objects in JavaScript?
βž–βž–βž–βž–βž–βž–βž–
What is a prototype chain?
βž–βž–βž–βž–βž–βž–βž–
What is the difference between Call, Apply and Bind?
βž–βž–βž–βž–βž–βž–βž–
What is JSON and its common operations?
βž–βž–βž–βž–βž–βž–βž–
What is the purpose of the array slice method?
βž–βž–βž–βž–βž–βž–βž–
What is the difference between slice and splice?
βž–βž–βž–βž–βž–βž–βž–
How do you compare Object and Map?
βž–βž–βž–βž–βž–βž–βž–
What is the difference between == and === operators?
βž–βž–βž–βž–βž–βž–βž–
What are lambda or arrow functions?

@Diyorbekk_dev
⚑2
Diyorbek.dev | πŸ‘¨πŸ»β€πŸ’»
Module 1. Channel Contents The First Step In JavaScript. βž–βž–βž–βž–βž–βž–βž– isNaN(Biladiganlar bormi?πŸ˜‰ ) βž–βž–βž–βž–βž–βž–βž– toPrecision() in JavaScript? βž–βž–βž–βž–βž–βž–βž– ~~ operator in JavaScirpt? βž–βž–βž–βž–βž–βž–βž– Truthy and Falsy elementlar βž–βž–βž–βž–βž–βž–βž– 5 Scopes in JavaScript! βž–βž–βž–βž–βž–βž–βž– Array Methods!…
Insha'alloh Ertadan 2 - Module boshlanadi!

Ikkinchi Moduleda endi sizlar ham ishtirok etishingiz mumkin!

Tartibi:
1) Jadval shakillantiramiz! (Qatnashuvchilar ism familyasi yoziladi!)
2) Harkim o'zi o'rganmoqchi va o'rgatmoqchi bo'lgan mavzularni yozib chiqadi!
3) Vaqtni kelishib olib muhokama qilamiz. (want to learn want to teach!)
4) 2 - Module dan keyin interview tashkillashtirish!


P.S: Iloji boricha active bo'lishga harakt qilinglar. Bu o'sishingiz uchun juda katta qadam bo'loladi. Interviewdan yaxshi o'tganlar va o'zini ko'rsatganlarga IQRO companyga offer olib beraman! πŸ˜‰ Bu bo'nus! Hozircha online shug'illanamiz, keyinchalik offline biror chiroyli joyda yig'lib discuss qilamiz barchasini! Startup loyihalarni boshlaymiz!

One Step ahead of the best✊

@Diyorbekk_dev
πŸ”₯3πŸ’―2
What is a first class function?

In Javascript, functions are first class objects. First-class functions means when functions in that language are treated like any other variable.

For example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable. For example, in the below example, handler functions assigned to a listener

const handler = () => console.log("This is a click handler function");
document.addEventListener("click", handler);


Summary:
β–ͺ️Assigned to variables.
β–ͺ️Passed as arguments to other functions.
β–ͺ️Returned from other functions.

@Diyorbekk_dev
❀‍πŸ”₯1⚑1
I’m happy to share that I’ve obtained a new certification: JavaScript Algorithms and Data Structures from freeCodeCamp!

Now your turn! πŸ˜‰

@Diyorbekk_dev
πŸ‘3
2-Modulni boshlaymiz!

1-qadamda qatnashuvchilar quyidagi listni namunadagidek toβ€˜ldirishingiz kerak!

Oβ€˜rganmoqchi boβ€˜lgan mavzuyingizni yozasiz: Want to learn!

Oβ€˜rgatmoqchi boβ€˜lgan mavzuyingizni yozasiz: Want to teach!

Quyidagi listga barcha uchun access berilgan bemalol toβ€˜ldirsangiz boβ€˜ladi!

Mavzular toβ€˜ldirilgandan soβ€˜ng! Biror kunni rejalashtirib online suhbat qilamiz! Keyin esa bir birimizga oβ€˜rgatishni boshlaymiz!

https://docs.google.com/spreadsheets/d/1UMKMi4jX1Tg3bS6WC_9jCCi-ZmRcRjhRzzSVIQqpGwM/edit?usp=sharing
Diyorbek.dev | πŸ‘¨πŸ»β€πŸ’» pinned Β«2-Modulni boshlaymiz! 1-qadamda qatnashuvchilar quyidagi listni namunadagidek toβ€˜ldirishingiz kerak! Oβ€˜rganmoqchi boβ€˜lgan mavzuyingizni yozasiz: Want to learn! Oβ€˜rgatmoqchi boβ€˜lgan mavzuyingizni yozasiz: Want to teach! Quyidagi listga barcha uchun access…»
JavaScriptda barcha Γ²zgaruvchilar qaysi hotirada saqlanadi?
Anonymous Quiz
58%
Heap
42%
Stack
Forwarded from Dev thinking loud
Mana nima sababdan JavaScriptda hamma o'zgaruvchilar heapda saqlanadi: chunki stackdagi joy function tugashi bilan tozalanadi (function ozi stackdan "pop" bo'ladi), closuredagi functionga esa u joy keyin ham kerak.

Manba:
https://exploringjs.com/deep-js/ch_environments.html#recursion-via-environments
Here's a Clean Architecture decomposed on a simple example in React that anyone can understand.
(a 2-minute masterclass)

The idea behind:
1. Separate concerns (SoC) into functional layers
2. Invert adapter dependency

This makes the React app "easy to change" for the next business requirement/feature. We literally have to touch fewer places to implement a new software behavior.

@Diyorbekk_dev