CRC.Quick.JavaScript.pdf
2.4 MB
Quick JavaScript
Are you an experienced programmer who wants to get started quickly in
JavaScript and the HTML DOM? This is your book.
By David Matuszek
#free_book
Are you an experienced programmer who wants to get started quickly in
JavaScript and the HTML DOM? This is your book.
By David Matuszek
#free_book
👍4🔥4❤2
2023-11-07 16-01-03.gif
34.8 MB
🤯11👍5❤3
📒 𝗙𝗿𝗲𝗲 𝗯𝗼𝗼𝗸: 𝗘𝗹𝗼𝗾𝘂𝗲𝗻𝘁 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁
This is the best book about JavaScript, programming, and the wonders of the digital
Written by Marijn Haverbeke.
language: EN, ES, AR, RU, BUL, POR
#FreeBook
This is the best book about JavaScript, programming, and the wonders of the digital
Written by Marijn Haverbeke.
language: EN, ES, AR, RU, BUL, POR
#FreeBook
🔥13❤3👍3👏1
💻 A password generator with customizable length.
This example creates a simple password generator that, upon pressing the button, generates a random password with the specified length from the upper form, using characters from the specified charset.
This example creates a simple password generator that, upon pressing the button, generates a random password with the specified length from the upper form, using characters from the specified charset.
<div class="password-generator">
<input type="text" id="passwordLength" placeholder="Password length">
<input type="text" id="password" readonly>
<button onclick="generatePassword()">Generate</button></div>
function generatePassword() {
const length = parseInt(document.getElementById("passwordLength").value);
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+";
const charsetLength = charset.length;
let password = [];
for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * charsetLength);
password.push(charset[randomIndex]);
}
document.getElementById("password").value = password.join('');
}❤20👍15🔥5👎1
🧐 Interview Question:
What is the difference between Observable and Promise in JavaScript?
Answer:
Observable and Promise are two ways to handle asynchronous operations in JS.
• A Promise can either resolve successfully or with an error, but it executes only once.
• On the other hand, an Observable represents a stream of data that can be accessed at any time; it can emit multiple values over time during its execution and can be stopped at any point.
What is the difference between Observable and Promise in JavaScript?
Answer:
Observable and Promise are two ways to handle asynchronous operations in JS.
• A Promise can either resolve successfully or with an error, but it executes only once.
• On the other hand, an Observable represents a stream of data that can be accessed at any time; it can emit multiple values over time during its execution and can be stopped at any point.
🤔6👍4❤2