One of the most confusing things in JavaScript is the 𝘁𝗵𝗶𝘀 𝗸𝗲𝘆𝘄𝗼𝗿𝗱. Took some time to understand how it really works and how 𝗰𝗮𝗹𝗹(), 𝗮𝗽𝗽𝗹𝘆(), and 𝗯𝗶𝗻𝗱() help control it. Wrote a short blog to document my learning with simple examples. Read here: https://lnkd.in/gPxNPpDq Learning with Chai Aur Code #JavaScript #WebDev
Understanding JavaScript this keyword with Chai Aur Code
More Relevant Posts
-
𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 𝗖𝗹𝗮𝘀𝘀𝗲𝘀? 𝗡𝗼𝘁 𝗥𝗲𝗮𝗹𝗹𝘆 🧠 JS doesn’t have real classes, it’s all prototypes, and classes are just syntactic sugar. Today’s session made this click, prototypes, constructor functions, and how modern class syntax actually works under the hood. #JavaScript #ChaiCode #WebDev
To view or add a comment, sign in
-
-
🚫 Stop writing ugly numbers in JavaScript. There's a better way. Instead of squinting at 1000000, you can write 1_000_000 — same value, way more readable. const price = 1_000_000; // same as 1000000 const users = 10_000; // same as 10000 const interval = 4_500; // 4.5 seconds No performance cost. No runtime difference. Just cleaner code. The underscore is just a visual separator — JavaScript ignores it completely. Yet somehow it makes your code feel 10× more professional. Small trick. Big difference. 🚀 #JavaScript #TypeScript #CleanCode #WebDev
To view or add a comment, sign in
-
-
🚀 JavaScript Fundamentals Series — Part 7 Most developers use arrays every day… But many don't fully understand array methods. This guide explains the most important ones: • map() • filter() • reduce() These methods help you write cleaner and more functional JavaScript. Once you master them, your code becomes much more expressive. Full guide 👇 https://lnkd.in/dZTRRCUx #javascript #webdevelopment #functionalprogramming
To view or add a comment, sign in
-
Got a minute for some JavaScript? 🍵 What does this code output? Answers 🔍 >>> - ReferenceError: message is not defined Why? Because let lives only inside the block where it’s created. In this code, message is created inside the *if {}* and *else {}* blocks. When JavaScript reaches *console.log(message)*, it is already outside those blocks, so the variable no longer exists. #javascript #webdevelopment
To view or add a comment, sign in
-
-
The WTF JS GitHub repository is a hilarious yet insightful collection of JavaScript quirks and WTF moments. Learn and laugh while uncovering the language's weird side! 🔥 Link 🔗: https://lnkd.in/dWYWQmfB I hope this helps ✅ Do Like 👍 & Repost 🔄 #html #css #javascript #typescript #react #viral
To view or add a comment, sign in
-
🚀 What I Learned Today – JavaScript Basics Today I revised some important concepts in JavaScript: 🔹 Loops (for, while, do-while, for...of, for...in) 🔹 Infinite loop and why it should be avoided 🔹 Strings and how they store text 🔹 String properties (length, indexing) 🔹 Template literals & string interpolation 🔹 String methods (toUpperCase, trim, slice, replace, etc.) Also understood that strings are immutable in JavaScript. Small steps every day to become a better developer 💻 #JavaScript #WebDevelopment #LearningInPublic #CodingJourney
To view or add a comment, sign in
-
-
Implemented Selection Sort in JavaScript, where the smallest element is selected in each iteration and placed at its correct position. A simple yet effective way to understand sorting fundamentals and in-place operations. #JavaScript hashtag#DSA hashtag#Algorithms hashtag#Coding hashtag#WebDevelopment
To view or add a comment, sign in
-
-
Understanding async is a turning point in JavaScript. Just published a beginner-friendly blog on Synchronous vs Asynchronous JS ✨ 👉 https://lnkd.in/g-RB5ZU2 Chai Aur Code Hitesh Choudhary Piyush Garg Akash Kadlag Anirudh Jwala #chaicode #javascript
To view or add a comment, sign in
-
-
𝗡𝗲𝘄 𝗕𝗹𝗼𝗴 𝗶𝘀 𝗟𝗶𝘃𝗲! 👩💻 In this blog, I covered: -> What a callback function is -> How functions can be passed as values -> Why callbacks are important in asynchronous JavaScript -> The callback nesting (callback hell) Read it here 👇 https://lnkd.in/gCASa8Sg Learning with Chai Aur Code ☕💻 Guidance by Hitesh sir, Piyush sir and Akash sir. #chaicode #javascript #webdevelopment
To view or add a comment, sign in
-
-
Javascript: Undefined vs null Ever seen undefined and null in JavaScript and felt confused? 🤔 You’re not alone. Many beginners mix them up. But the difference is actually very simple. Here’s the easy way to understand it: • undefined → A variable is declared but no value is assigned yet let name; console.log(name); // undefined • null → A developer intentionally sets an empty value let user = null; • undefined is automatic – JavaScript gives it by default. • null is intentional – The developer sets it manually. • Both mean “no value”, but the reason is different. Simple rule to remember: 👉 undefined = not assigned yet 👉 null = intentionally empty Understanding this small concept can help you avoid many bugs in JavaScript. #JavaScript #WebDevelopment #FrontendDevelopment #ProgrammingTips #LearnJavaScript #CodingForBeginners #SoftwareEngineering #TechEducation #JavaScriptDeveloper #DevCommunity
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
we have class methods now to overcome this