This repository contains questions on JavaScript and TypeScript, which were originally published in the form of quizzes in the telegram channel https://t.me/intspirit.
A typical question is what the given piece of code will output. However, there are others. For example, the memory-usage and optimization folders contain questions about memory leaks, the performance of a particular piece of code, and more.
Use these questions to prepare for an interview or to test your language skills.
Each question is contained in a separate file.
In the comment to the question there is a link to an explanation of the problem. Even if you answered the question correctly, it is recommended to read the explanation, because it may reveal additional interesting details.
function log(arg) {
console.log(arg);
}
log(...'abc');
// What will be the output?
// Try yourself and read the explanation: https://t.me/intspirit/626?comment=674
If you follow the link, you will read this explanation:
The spread (...) syntax allows an iterable, such as string or array, to be expanded in function call's arguments list.
log(...'abc')
is equivalent to
log('a', 'b', 'c');
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
The repository is live and will be regularly updated with new challenges. The repository currently contains questions in the following categories:
- Arguments
- Algorithms
- Arrays
- Classes
- Context
- Destructoring & rest & spread
- ES6 modules
- Event loop
- Html events
- Generators
- JSON
- Map & WeakMap
- Memory usage
- Objects
- Performance
- Promises
- Prototypes
- Set
- Strings
- Symbols
- Type coercion
- Variable scope
- Workers
- Other
Let's learn the language we use every day.