aliyev.dev
17 subscribers
53 photos
2 videos
1 file
41 links
JavaScript Tips and Tricks

Follow us:
YouTube: youtube.com/@developer_nijat
TikTok: tiktok.com/@developer.nijat
Facebook: fb.com/groups/1298499510834490
Website: aliyev.dev
Download Telegram
17. JavaScript Skills Certification Test (Intermediate)
The test covers topics like Design Patterns, Memory management, concurrency models, and event loops.

👉 https://www.hackerrank.com/skills-verification/javascript_intermediate

⚛️ React JS

18. React JS for Beginners
This course is taught hands-on by experts. Learn prerequisites of HTML, CSS, and Javascript. Also, learn to create a React App.

👉 https://www.mygreatlearning.com/academy/learn-for-free/courses/react-js-tutorial

19. React JavaScript - Fundamentals to Coding
You will learn to set up your first React environment, components, keys, and props. It also discusses folder structure, CSS styling, and React operators.

👉 https://alison.com/course/react-javascript-fundamentals-to-coding-and-new-beginnings

20. Front-End Development Libraries
You'll learn how to add logic to your CSS styles, extend them with Sass, and work with Bootstrap.

Later, you'll build a shopping cart and other applications to learn how to create powerful SPAs with React and Redux.

👉 https://www.freecodecamp.org/learn/front-end-development-libraries/

21. React Essential Training
You will learn how to set up Chrome tools for React; create new components; work with the built-in Hooks in React; use the Create React App to run tests and more.

👉 https://www.linkedin.com/learning/react-js-essential-training-14836121

22. React Skills Certification Test
The test covers topics like Basic Routing, Rendering Elements, State Management (Internal Component State), Handling Events, ES6 and JavaScript, and Form Validation.

👉 https://www.hackerrank.com/skills-verification/react_basic

Source: https://dev.to/madza/26-frontend-certifications-for-web-developers-4md7

Follow us:
YouTube: youtube.com/@developer_nijat
Telegram: t.me/js_az
TikTok: tiktok.com/@developer.nijat
Facebook: facebook.com/groups/1298499510834490


#js #javascript #React #react #ReactJS #reactjs #web #webdev #developer #programming #webdeveloper #webdevelopment #learnprogramming #developernijat #aliyevsdevtales
JavaScript's Date object provides several methods to work with dates. Here are some common methods along with examples:

### Creating a Date Object:
// Create a new Date object representing the current date and time
const currentDate = new Date();

// Create a new Date object for a specific date and time
const specificDate = new Date('2023-11-20T08:30:00');
### Getting Components of a Date:
const date = new Date();

// Get the year, month, day, hour, minute, second, and millisecond
const year = date.getFullYear();
const month = date.getMonth(); // Months are zero-based (0-11)
const day = date.getDate();
const hours = date.getHours();
const minutes = date.getMinutes();
const seconds = date.getSeconds();
const milliseconds = date.getMilliseconds();
### Setting Components of a Date:
const date = new Date();

// Set year, month, day, hour, minute, second, and millisecond
date.setFullYear(2023);
date.setMonth(10); // Month: 0-11 (November is 10)
date.setDate(20);
date.setHours(8);
date.setMinutes(30);
date.setSeconds(0);
date.setMilliseconds(0);
### Formatting Dates:
const date = new Date();

// Format date components as a string
const dateString = date.toDateString(); // "Wed Nov 20 2023"
const timeString = date.toTimeString(); // "08:30:00 GMT+0000 (Coordinated Universal Time)"
const localString = date.toLocaleString(); // "11/20/2023, 8:30:00 AM" (depends on local settings)
### Operations on Dates:
const date = new Date();

// Get the number of milliseconds since January 1, 1970, 00:00:00 UTC
const millisecondsSinceEpoch = date.getTime();

// Calculate the difference between two dates
const date1 = new Date('2023-11-20');
const date2 = new Date('2023-11-25');
const differenceInMilliseconds = date2 - date1;
const differenceInSeconds = differenceInMilliseconds / 1000;
These methods cover the basics of working with dates in JavaScript. There are many more methods and functionalities available for handling dates, but these are some of the most commonly used ones.
DNS (Domain Name System), internetin əsas təşkilatçılarından biridir. DNS, insanların anlaya biləcəyi domain adlarını (məsələn, example.com) IP ünvanlarına çevirən bir hierarşik yapıdır. İnternetdə hər bir cihazın, saytın və ya hizmətin bir IP ünvanı vardır, lakin insanların bu numerik adresləri yadda saxlamağı çətin ola bilər. İşte burada DNS-in rolu başlayır.

DNS, istifadəçilərin domain adlarına daxil etdikləri veb ünvanlarını DNS serverlər vasitəsi ilə IP ünvanlarına tərcümə edir. Bu sistem, istifadəçilərin veb brauzerləri ilə serverlər arasında mürəkkəb numerik adreslər yerinə daha anlaşıqlı adları istifadə etmələrini təmin edir.

Bu sistem bir hiyerarxiya ilə təşkil olunmuşdur: domain adları, "top-level domain"lardan (TLD) başlayaraq daha aşağı səviyyələrə doğru (nümunə üçün, .com, .org, .net kimi) bölünür. Hər bir domain adı serveri, məsələn, .com domainində olan server, ona aid olan domain adlarının IP ünvanlarına tərcümə edilməsində kömək edir.

DNS, internetin fəal işləməsində əhəmiyyətli bir rol oynayaraq, istifadəçilərin vebdə asanlıqla dolaşmaq və saytlara çatmaq imkanını təmin edir.

Follow us:
YouTube: youtube.com/@developer_nijat
Telegram: t.me/js_az
TikTok: tiktok.com/@developer.nijat
Facebook: fb.com/groups/1298499510834490

#dns #network #INTERNET #web #developernijat #aliyevsdevtales
Here's the list of programming languages sorted by their creation year (TOP 19 popular):

1. C (1972) - Dennis Ritchie (United States - Bell Labs)
2. SQL (1974) - Donald D. Chamberlin and Raymond F. Boyce (United States - IBM)
3. Objective-C (1983) - Brad Cox and Tom Love (United States)
4. MATLAB (1984) - MathWorks (United States)
5. C++ (1985) - Bjarne Stroustrup (United States - Bell Labs)
6. Perl (1987) - Larry Wall (United States)
7. Haskell (1990) - Committee on Haskell 98 (United States and others through academic collaboration)
8. Python (1991) - Guido van Rossum (Netherlands)
9. R (1993) - Ross Ihaka and Robert Gentleman (New Zealand)
10. PHP (1994) - Rasmus Lerdorf (Denmark)
11. Java (1995) - James Gosling (United States - Sun Microsystems)
12. JavaScript (1995) - Brendan Eich (United States - Netscape Communications Corporation)
13. C# (2000) - Microsoft Corporation (United States)
14. Scala (2003) - Martin Odersky (Germany)
15. Rust (2010) - Graydon Hoare (Canada - Mozilla Research)
16. Go (2009) - Google (United States)
17. Kotlin (2011) - JetBrains (Russia)
18. TypeScript (2012) - Microsoft Corporation (United States)
19. Swift (2014) - Apple Inc. (United States)

Follow us:
YouTube: youtube.com/@developer_nijat
Telegram: t.me/js_az
TikTok: tiktok.com/@developer.nijat
Facebook: fb.com/groups/1298499510834490

#programming #programminglanguage #evaluation #history #developernijat #aliyevsdevtales
📌 JavaScript Tip: Understand the concept of 'closures' - functions that remember the scope in which they were created. Closures allow functions to access and use variables from their parent function even after the parent function has finished executing. Example:

function outerFunction() {
const outerVar = 'I am from the outer function';

function innerFunction() {
console.log(outerVar); // Accessing outerVar from the outer function
}

return innerFunction;
}

const myFunction = outerFunction();
myFunction(); // Output: 'I am from the outer function'
#JavaScript #Closures #CodingConcepts
Nodejs.pdf
755.7 KB
Nodejs interview questions
Based on current benchmarks and user reports, Microsoft Edge emerges as the browser using the least memory and CPU resources on a Windows device. Here's a breakdown:

CPU:

* Microsoft Edge: Consumes the least CPU resources compared to other popular browsers.
* Opera GX: Slightly higher CPU usage than Edge, but still considerably lower than Chrome and Firefox.
* Chrome: The most CPU-intensive browser among the popular options.
* Firefox: Moderately high CPU consumption, especially with multiple tabs open.

Memory:

* Opera GX: Boasts the lowest memory usage, with features like RAM limiter and tab suspender helping to optimize resource allocation.
* Microsoft Edge: Follows closely behind Opera GX in terms of memory consumption.
* Firefox: Moderately lower memory usage than Chrome, but still higher than Opera and Edge.
* Chrome: The most memory-intensive browser, consuming substantial resources even with a few tabs open.

Here's a summary table for a quick comparison:

| Browser | CPU Usage | Memory Usage |
|---|---|---|
| Microsoft Edge | Lowest | Low |
| Opera GX | Low | Lowest |
| Firefox | Moderate | Moderate |
| Chrome | Highest | Highest |

Additional Factors to Consider:

* Extensions and Plugins: These add-ons can significantly increase resource consumption, so choose them wisely and consider disabling unused ones.
* Browsing Habits: Opening multiple tabs, watching videos, and using resource-intensive web apps can impact resource usage, regardless of the chosen browser.
* Hardware Specifications: A low-end system will benefit more from a lightweight browser like Edge or Opera GX compared to a high-end machine that can handle Chrome's heavier demands.

Conclusion:

While Microsoft Edge currently holds the crown for minimal resource consumption on Windows, Opera GX is a strong contender with its efficient memory management and unique features. Ultimately, the best browser for you depends on your specific needs, browsing habits, and hardware capabilities.

Here are some resources for further exploration:

* Which Browser Uses the Least Memory? [Answered] ([https://windowsreport.com/best-browser-low-memory/](https://windowsreport.com/best-browser-low-memory/))
* Which Browser Uses the Least RAM and CPU on Windows, macOS, and ChromeOS? ([https://rigorousthemes.com/blog/best-browsers-for-low-cpu-usage/](https://rigorousthemes.com/blog/best-browsers-for-low-cpu-usage/))

Follow us:
YouTube: youtube.com/@developer_nijat
Telegram: t.me/js_az
TikTok: tiktok.com/@developer.nijat
Facebook: fb.com/groups/1298499510834490
Website: aliyev.dev
You can use the beforeunload event in JavaScript to display a message to the user before they leave the current page. Here's an example:

window.addEventListener('beforeunload', function (e) {
e.preventDefault();
e.returnValue = ''; // This is for legacy support, but the message is usually ignored
return 'Are you sure you want to leave this page?'; // Modern browsers will display this message
});
When the user tries to leave the page, a browser dialog will typically appear with the message you've specified.
#JavaScript - Why indexes start from 0 ? 🤔

There are different reasons why most programming languages, including #JavaScript, use zero-based indexing for arrays. Here are some of them:

- Zero-based indexing is more natural for pointer arithmetic, which is how compilers access array elements. For example, if arr is an array of integers, then arr[i] is equivalent to *(arr + i), where arr is the address of the first element and i is the offset from that address. Using zero as the offset means no extra computation is needed to access the first element.

- Zero-based indexing is more efficient for storing and retrieving multidimensional arrays, especially in row-major order. This is because the formula for calculating the address of an element in a two-dimensional array is simpler when the indices start from zero. For example, if arr is a two-dimensional array of size m x n, then the address of arr[i][j] is address + [(i)*n + (j)] * (sizeof(int)), where address is the base address of the array. This formula involves only four operations, whereas if the indices start from one, it would involve six operations.

- Zero-based indexing is more consistent with #mathematical notation, such as set theory and linear #algebra. For example, the first element of a set is usually denoted by a_0, and the first element of a vector is usually denoted by v_0. Using zero-based indexing makes it easier to translate these concepts into code.

I hope this helps you understand why #JavaScript and other languages use zero-based indexing for arrays.

Follow us:
YouTube: youtube.com/@developer_nijat
Telegram: t.me/js_az
TikTok: tiktok.com/@developer.nijat
Facebook: fb.com/groups/1298499510834490
Website: aliyev.dev

#JS #frontend #javascript #Web #aliyevsdevtales #developernijat #index