Got a minute for some JavaScript? 🍒 What does this code output? Answers 🔍 >>> - "Tom says meow" - TypeError: c.createKitten is not a function - "Kitty says meow" Why the TypeError? *createKitten* is a static method - it lives on the *Cat* constructor, not on instances. *c* is an instance, so it cannot access static methods. Only *Cat.createKitten()* works. #javascript #webdevelopment
Liliia Dokuchaeva’s Post
More Relevant Posts
-
💡 JavaScript Trick Question: 3 + 2 + "7" In JavaScript, the answer is: 👉 "57" 🔍 Why? 🔹 JavaScript follows left-to-right evaluation and uses type coercion. ⚡ Key Insight : 🔹Once a string enters the expression, everything after that becomes a string operation. "In JavaScript, the moment a string joins the party, numbers stop adding and start concatenating." #JavaScript #WebDevelopment #CodingInterview #Frontend #JSConcepts
To view or add a comment, sign in
-
-
Day 10 of 100 🎉 — Double digits!! In JavaScript, there is ONE value that is NOT equal to itself. Not a bug. Not a mistake. It's by design. 😱 Comment down 👇 5 lines — 5 answers! Hint: Its name literally says "Not a Number" — yet typeof says it IS a number. And isNaN vs Number.isNaN behave differently too. This one has LAYERS! 🧅 Full explanation in the comments tonight! #100DaysOfCode #JavaScript #CodingInterview #JavaScriptTips #WebDevelopment
To view or add a comment, sign in
-
-
How to understand a Javascript function? What arguments are passed? Why it is passed? What is the function doing inside? What it is returning? What does the JS doing with the returned value? If you can answer to all the questions then you have understood a function. #Javascript #frontenddevelopement
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
-
-
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
-
-
0ms Delay... but what about the extra arguments? 🧐 Most developers know setTimeout(callback, delay), but did you know you can pass arguments directly into the callback? #JavaScript #WebDevelopment #CodingQuiz #SoftwareEngineering #FrontendTips
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
-
-
Don’t learn randomly ❌ Follow a roadmap 💻 HTML & CSS → CodeWithHarry JavaScript → Chai aur Code Start today, stay consistent, and become a developer 🚀🔥 Save this for later!” #webdevelopment #codingjourney #learncoding #htmlcss #javascript
To view or add a comment, sign in
-
I’ve been using these handwritten JavaScript notes to strengthen my understanding of code structure and core concepts. Whenever I encounter bugs or errors in my programs, I refer back to these notes to analyze how the code works and identify the appropriate patterns. I highly recommend that beginner JavaScript developers explore and download these notes—they can be a valuable resource for building a strong foundation. Link To Download 👇 https://lnkd.in/geeKFeB5 #javascript #Developer #mernstack #javascriptnotes
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
I liked the "meow" example. It reminds me of David J. Malan in CS50. Really cool!