𝐈 𝐛𝐞𝐭 𝐲𝐨𝐮 𝐝𝐢𝐝𝐧’𝐭 𝐤𝐧𝐨𝐰 𝐭𝐡𝐢𝐬… . . . There’s a 30-𝐲𝐞𝐚𝐫-𝐨𝐥𝐝 𝐛𝐮𝐠 in JavaScript — and it’ll never be fixed. 𝐭𝐲𝐩𝐞𝐨𝐟 𝐧𝐮𝐥𝐥 === "𝐨𝐛𝐣𝐞𝐜𝐭"; // 𝐭𝐫𝐮𝐞 🤯 This is not a quirk — it’s a mistake. When JS was created in 1995, 𝐧𝐮𝐥𝐥 was stored as all 0’s in memory. Objects also used 0 as a type tag. So JS confused them. Now fixing it would break the web. 💀 #JavaScript #ProgrammingHistory #WebDev #JavaScript #WebDevelopment #ProgrammingHistory
Rishabh Singh’s Post
More Relevant Posts
-
Think you can start a new line after `return`? Cute. JavaScript's "helpful" semicolon insertion will stab you in the back. `return\n{ user: 'Gabo' }` becomes `return;`. Your function now silently returns `undefined`. The object vanishes. Is this a clever rule for cleaner code, or a silent logic-killer that semicolons exist to prevent? #GaboTips #JavaScript
To view or add a comment, sign in
-
JavaScript for 15 Days – Day 6: If / Else Statements. Today you'll know how to make your JavaScript code think and decide using if, else if, and else statements. These structures allow programs to run different blocks of code based on specific conditions just like real-life decisions: let score = 85; if (score >= 90) { console.log("Excellent!"); } else if (score >= 70) { console.log("Good job!"); } else { console.log("Keep practicing!"); } Key Takeaways: if checks the first condition. else if tests another one if the first fails. else runs only when all above are false. Conditional statements are what make code dynamic and smart they let programs respond to different situations! #JavaScript #FrontendDevelopment #WebDevelopment #CodingJourney #LearnToCode #15DaysJS #DevPerDay
To view or add a comment, sign in
-
🚀 JavaScript Trick You Should Know! What do you think the result will be? 👇 "5" + 2 // ? "5" - 2 // ? ✅ "5" + 2 → "52" ✅ "5" - 2 → 3 Why? Because (+) combines strings, while (-) forces JavaScript to convert "5" into a number. A small example — but it shows how type coercion can completely change your output. ⚡ #JavaScript #FrontendDevelopment #CodingTips
To view or add a comment, sign in
-
The JavaScript filter() method is a powerful way to create a new array containing only the elements that meet a certain condition. It goes through each item in the array and returns the ones that pass the test you provide. For example, to get all even numbers from an array: javascript const numbers = [1, 2, 3, 4, 5]; const evens = numbers.filter(num => num % 2 === 0); console.log(evens); // Output: [2, 4] Use filter() whenever you need to sift through data and extract only what’s relevant, making your code more declarative and concise! #JavaScript #WebDevelopment #CodingTips #ArrayMethods
To view or add a comment, sign in
-
🤔 What's the difference between 𝗺𝗮𝗽()and 𝗳𝗹𝗮𝘁𝗠𝗮𝗽() in #JavaScript? #map() transforms each element in an array and returns a new array with the same length. #flatMap() does the same but flattens nested arrays by one level, perfect for unwrapping results without extra .flat() calls! This makes your code shorter and more efficient for handling nested data. Which do you prefer using in your projects, and why? Share your thoughts! #CleanCodeSolutions #JavaScript #WebDevelopment #Fullstack
To view or add a comment, sign in
-
-
Going back to basics 🌱 What does "typeof null" returns ?? Surprisingly, it returns "object" Yes it has been a "bug" in Javascript since the very beginning as i have read. When Javascript was first designed, values were stored in a way that caused "null" to be mistakenly tagged as an "object". And even after years, it remains that way for backward compatibility. So, "typeof null" is "object" but null is not an "object". #Javascript #Frontend
To view or add a comment, sign in
-
-
⚡ JavaScript async/await Cheat Sheet ⚡ Basic async/await & try/catch ⛔ AbortController & timeouts 🧰 Promise utilities (all/allSettled/race/any) 🔁 Retries, backoff, and concurrency control The Most Complete Full Stack Dev Roadmap ➡️ https://champ.ly/-FLdfic_ --- If you found this guide helpful, follow TheDevSpace for more tips, tutorials, and cheat sheets on web development. Let's stay connected! 🚀 Also follow 👉 W3Schools.com & JavaScript Mastery to learn web development. #javascript #js #webdevelopment #WebDevelopment #JavaScript #Async #APIDesign #CheatSheet
To view or add a comment, sign in
-
The “Result Pattern” is a great way to improve not only the code flow, but also the developer experience for those who’ll work with your code down the line. No need to try/catch random errors and guess error codes, everything is typed and you know exactly what you want/need to handle. #javascript #typescript #developerexperience #designpatterns #softwaredevelopment
To view or add a comment, sign in
-
-
In the upcoming Webiny v6, we’re rewriting a lot of internals, and the public API for extensions will be completey new. As we’re rewriting things, we’re taking the opportunity to improve the code base and DX for external teams but also for ourselves. This is just one example: the “Result Pattern”. Widely used in C#, proved to be a great pattern for managing and documenting a variety of potential errors that can be returned as a result of an operation. And not a single try/catch is necessary!! 🥳 #designpatterns #developerexperience #softwaredevelopment
The “Result Pattern” is a great way to improve not only the code flow, but also the developer experience for those who’ll work with your code down the line. No need to try/catch random errors and guess error codes, everything is typed and you know exactly what you want/need to handle. #javascript #typescript #developerexperience #designpatterns #softwaredevelopment
To view or add a comment, sign in
-
-
💻 JavaScript Fun Today! Here’s what I learned: 🎯 How to use variables (var, let, const) and understand their differences 🎯 How to interact with users using alert() and prompt() 🎯 Playing with strings, numbers, and template literals 🎯 Linking JS files to HTML and using defer for smoother loading 💬 Would love to hear your tips for making JS more interactive and fun! #JavaScript #WebDevelopment #Frontend #JSBasics #100DaysOfCode #LearningInPublic #BuildInPublic
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