A comprehensive collection of JavaScript intermediate-level examples and exercises covering ES6+ features, advanced concepts, and object-oriented programming principles.
This course is designed to bridge the gap between beginner and advanced JavaScript by focusing on modern ES6+ features, proper understanding of this keyword, function methods, and object-oriented programming principles.
- Master modern JavaScript (ES6+) features and syntax
- Understand the
thiskeyword and its binding rules - Learn advanced function methods (
call,apply,bind) - Implement object-oriented programming principles
- Develop clean, maintainable JavaScript code
- Introduction to ES6/ES2015 and subsequent versions
- Key improvements over traditional JavaScript
- Browser compatibility and transpilation basics
- Feature detection techniques
- String interpolation with template literals
- Multi-line strings
- Tagged templates for advanced string processing
- Practical examples: HTML generation, URL building, data formatting
- Concise function syntax
- Lexical
thisbinding - When to use (and when not to use) arrow functions
- Function parameter defaults
- Rest operator for variable arguments
- Combining with destructuring
- Array and object spreading
- Function arguments spreading
- Practical use cases and examples
- Extracting values from arrays
- Skipping values with comma separators
- Nested array destructuring
- Shorthand property names
- Computed property names
- Method shorthand syntax
- Iterating over iterable objects
- Comparison with for...in loop
- Working with strings, arrays, and other iterables
- Key differences and use cases
- When to use each loop type
- Common pitfalls and best practices
- Four binding rules: Default, Implicit, Explicit, New
- Context loss in callbacks
- Debugging
thisissues - Practical solutions and patterns
- Function borrowing techniques
- Setting explicit context
- Common use cases and examples
- Modern alternatives (spread operator)
- Lexical
thisbinding behavior - Solving context issues with arrow functions
- When arrow functions are NOT appropriate
- Creating private scopes
- Module pattern implementation
- Common use cases
- Creating objects with constructors
- Prototype chain basics
- Comparison with ES6 classes
- Understanding scope and shadowing
- Common bugs and how to avoid them
- Best practices for variable naming
- Encapsulation: Data hiding and bundling
- Inheritance: Code reuse and hierarchical relationships
- Polymorphism: Multiple forms and dynamic behavior
- Real-world examples and implementations
- Basic understanding of JavaScript fundamentals
- Familiarity with variables, functions, and basic control structures
- A modern web browser or Node.js environment
- Sequential Learning: Start with file
050-es6-overview.jsand progress through each numbered file - Hands-on Practice: Each file contains commented examples - uncomment and modify them to understand concepts
- Experiment: Try creating your own examples based on the patterns shown
- Build Projects: Apply these concepts in small projects to solidify understanding
# Using Node.js
node 050-es6-overview.js
# Or open files directly in your browser consoleJS Intermediate Course/
βββ 050-es6-overview.js
βββ 051-template-literals-tagged.js
βββ 052-arrow-functions.js
βββ 053-default-parameters-rest.js
βββ 054-spread-operator.js
βββ 055-destructuring-arrays.js
βββ 056-enhanced-object-literals.js
βββ 057-for-of-loop.js
βββ 058-for-in-vs-for-of.js
βββ 059-this-keyword.js
βββ 060-call-apply-bind-methods.js
βββ 061-arrow-fn-this.js
βββ 062-iife.js
βββ 063-function-constructor.js
βββ 064-variable-shadowing.js
βββ 065-oop-principles-encapsulation-inheritance-polymorphism.js
βββ README.md
- Progressive Learning: Each file builds upon previous concepts
- Practical Examples: Real-world code examples and use cases
- Commented Code: Detailed explanations within each file
- Modern JavaScript: Focus on current best practices and ES6+ features
- Hands-on Approach: Uncomment and experiment with code directly
- MDN Web Docs: Comprehensive JavaScript reference
- Can I Use: Browser compatibility checker
- VS Code: Recommended code editor with JavaScript extensions
- Chrome DevTools: For debugging and experimentation
By completing this course, you will:
- Write modern, clean JavaScript using ES6+ features
- Understand and manage the
thiskeyword effectively - Create reusable and maintainable code
- Implement object-oriented programming principles
- Debug common JavaScript issues
- Prepare for advanced JavaScript frameworks and libraries
This is a learning repository. Feel free to:
- Report issues or unclear explanations
- Suggest improvements or additional examples
- Share your own implementations
This educational repository is open for learning purposes. Feel free to use, modify, and distribute for educational purposes.
Happy Coding! π
Remember: The best way to learn is by doing. Experiment with the code, break it, fix it, and understand why it works the way it does.