
- Main
- Catalog
- Computer science
- Advertising on the Telegram channel «Web Development - Javascript Courses»
Advertising on the Telegram channel «Web Development - Javascript Courses»
Get free resources to learn web development , html , CSS , JavaScript , reactjs , wordpress , Php , nodejs, etc.
Channel statistics
function sum(...numbers) {
return numbers.reduce((a, b) => a + b, 0);
}
console.log(sum(1, 2, 3)); // 6
{}
32. What are template literals?
Template literals use backticks (`) to embed variables and expressions.
const name = 'Alice';
console.log(Hello, ${name}!); // Hello, Alice!
{}
33. What is a module in JS?
Modules help organize code into reusable files using export and import.
// file.js
export const greet = () => console.log('Hi');
// main.js
import { greet } from './file.js';
greet();
{}
34. Difference between default export and named export
• Default export: One per file, imported without {}
• Named export: Multiple exports, must use the same name
// default export
export default function() {}
import myFunc from './file.js';
// named export
export const x = 5;
import { x } from './file.js';
{}
35. How do you handle errors in JavaScript?
Use try...catch to handle runtime errors gracefully.
try {
JSON.parse("invalid json");
} catch (error) {
console.log("Caught:", error.message);
}
{}
36. What is the use of try...catch?
To catch exceptions and prevent the entire program from crashing. It helps with debugging and smoother user experience.
37. What is a service worker?
A script that runs in the background of web apps. Enables features like offline access, caching, and push notifications.
38. localStorage vs. sessionStorage
• localStorage: Data persists after tab/browser close
• sessionStorage: Data clears when the tab is closed
localStorage.setItem('user', 'John');
sessionStorage.setItem('token', 'abc123');
{}
39. What is debounce and throttle?
• Debounce: Waits for inactivity before running a function
• Throttle: Limits function execution to once per time interval
Used in scroll/input/resize events to reduce overhead.
40. What is the Fetch API?
Used to make network requests. Returns a Promise.
fetch('https://api.example.com')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
{}
💬 Double Tap ❤️ for Part-5!queueMicrotask, MutationObserver — run immediately after the current operation finishes. ⚡
- Macrotasks: setTimeout, setInterval, I/O — run after microtasks are done. ⏳
23. What is JSON and how is it used?
JSON (JavaScript Object Notation) is a lightweight data-interchange format used to store and exchange data. 📁
const obj = { name: "Alex" };
const str = JSON.stringify(obj); // convert to JSON string
const newObj = JSON.parse(str); // convert back to object{}
24. What are IIFEs (Immediately Invoked Function Expressions)?
Functions that execute immediately after being defined. 🚀
(function() {
console.log("Runs instantly!");
})();{}
25. What is the difference between synchronous and asynchronous code?
- Synchronous: Runs in order, blocking the next line until the current finishes. 🛑
- Asynchronous: Doesn’t block, allows other code to run while waiting (e.g., fetch calls, setTimeout). ✅
26. How does JavaScript handle memory management?
JS uses automatic garbage collection — it frees up memory by removing unused objects. Developers must avoid memory leaks by cleaning up listeners, intervals, and unused references. ♻️
27. What is a JavaScript engine?
A JS engine (like V8 in Chrome/Node.js) is a program that parses, compiles, and executes JavaScript code. ⚙️
28. Difference between deep copy and shallow copy in JS
- Shallow copy: Copies references for nested objects. Changes in nested objects affect both copies. 🤝
- Deep copy: Creates a complete, independent copy of all nested objects. 👯
const original = { a: 1, b: { c: 2 } };
const shallow = { ...original }; // { a: 1, b: { c: 2 } } - b still references original.b
const deep = JSON.parse(JSON.stringify(original)); // { a: 1, b: { c: 2 } } - b is a new object{}
29. What is destructuring in ES6?
A convenient way to unpack values from arrays or properties from objects into distinct variables. ✨
const [a, b] = [1, 2]; // a=1, b=2
const {name} = { name: "John", age: 25 }; // name="John"{}
30. What is a spread operator (...) in ES6?
The spread operator allows an iterable (like an array or string) to be expanded in places where zero or more arguments or elements are expected, or an object expression to be expanded in places where zero or more key-value pairs are expected. 🥞
const nums = [1, 2];
const newNums = [...nums, 3]; // [1, 2, 3]
const obj1 = { a: 1 };
const obj2 = { ...obj1, b: 2 }; // { a: 1, b: 2 }{}
💬 Double Tap ❤️ For Part-4!
#JavaScript #JSInterview #CodingInterview #Programming #WebDevelopment #Developer #AsyncJS #ES6
let promise = new Promise((resolve, reject) => {
resolve("Success");
});{}
Use .then() for success and .catch() for errors. 🤝
12. Explain async/await
async functions return promises. await pauses execution until the promise resolves. ▶️⏸️
async function fetchData() {
const res = await fetch('url');
const data = await res.json();
console.log(data);
}{}
13. What is the difference between call, apply, and bind?
- call(): Calls a function with a given this and arguments. 🗣️
- apply(): Same as call(), but takes arguments as an array. 📦
- bind(): Returns a new function with this bound. 🔗
func.call(obj, a, b);
func.apply(obj, [a, b]);
const boundFunc = func.bind(obj);{}
14. What is a prototype?
Each JS object has a hidden [[Prototype]] that it inherits methods and properties from. Used for inheritance. 🧬
15. What is prototypal inheritance?
An object can inherit directly from another object using its prototype chain.
const parent = { greet() { return "Hi"; } };
const child = Object.create(parent);
child.greet(); // "Hi"{}
16. What is the use of ‘this’ keyword in JS?
this refers to the object from which the function was called. In arrow functions, it inherits from the parent scope. 🧐
17. Explain the concept of scope in JS
Scope defines where variables are accessible. JS has:
- Global scope 🌍
- Function scope 🏛️
- Block scope (with let, const) 🧱
18. What is lexical scope?
A function can access variables from its outer (parent) scope where it was defined, not where it's called. 📚
19. What are higher-order functions?
Functions that take other functions as arguments or return them. 🎓
Examples: map(), filter(), reduce()
20. What is a pure function?
- No side effects 🚫
- Same output for the same input ✅
Example:
function add(a, b) {
return a + b;
}{}
💬 Tap ❤️ for Part-3!
console.log(a); // undefined
var a = 10;{}
4. Explain closures with an example
A closure is when a function retains access to its lexical scope even when executed outside of it.
function outer() {
let count = 0;
return function inner() {
return ++count;
};
}
const counter = outer();
counter(); // 1
counter(); // 2{}
5. What is the difference between == and ===?
- == (loose equality): Converts operands before comparing
- === (strict equality): Checks type and value without conversion
'5' == 5 // true
'5' === 5 // false
6. What is event bubbling and capturing?
- Bubbling: Event moves from target to top (child → parent)
- Capturing: Event moves from top to target (parent → child)
You can control this with the addEventListener third parameter.
7. What is the DOM?
The Document Object Model is a tree-like structure representing HTML as objects. JavaScript uses it to read and manipulate web pages dynamically.
8. Difference between null and undefined
- undefined: Variable declared but not assigned
- null: Intentionally set to "no value"
let a; // undefined
let b = null; // explicitly empty
9. What are arrow functions?
Concise function syntax introduced in ES6. They do not bind their own this.
const add = (a, b) => a + b;
10. Explain callback functions
A callback is a function passed as an argument to another function and executed later.
Used in async operations.
function greet(name, callback) {
callback(Hello, ${name});
}
greet('John', msg => console.log(msg));{}
💬 Tap ❤️ for Part-2!Reviews channel
4 total reviews
- Added: Newest first
- Added: Oldest first
- Rating: High to low
- Rating: Low to high
Catalog of Telegram Channels for Native Placements
Advertising on the Telegram channel «Web Development - Javascript Courses» is a Telegram channel in the category «Интернет технологии», offering effective formats for placing advertising posts on TG. The channel has 53.4K subscribers and provides quality content. The advertising posts on the channel help brands attract audience attention and increase reach. The channel's rating is 17.8, with 4 reviews and an average score of 5.0.
You can launch an advertising campaign through the Telega.in service, choosing a convenient format for placement. The Platform provides transparent cooperation conditions and offers detailed analytics. The placement cost is 25.2 ₽, and with 13 completed requests, the channel has established itself as a reliable partner for advertising on Telegram. Place integrations today and attract new clients!
You will be able to add channels from the catalog to the cart again.
Комментарий