🗓️ 𝐃𝐚𝐲 𝟑𝟎 – JavaScript Operators & Hoisting Today I explored JavaScript operators and variable behavior: ➕ 𝗔𝗿𝗶𝘁𝗵𝗺𝗲𝘁𝗶𝗰 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀: +, -, *, /, %, ** 📝 𝗔𝘀𝘀𝗶𝗴𝗻𝗺𝗲𝗻𝘁 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀: =, +=, -=, *=, /=, %= ⚖️ 𝗖𝗼𝗺𝗽𝗮𝗿𝗶𝘀𝗼𝗻 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀: ==, ===, !=, !==, >, <, >=, <= 🔗 𝗟𝗼𝗴𝗶𝗰𝗮𝗹 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀: &&, ||, ! ❓ 𝗧𝗲𝗿𝗻𝗮𝗿𝘆 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿: condition ? doThis : doThat 🔍 𝗧𝘆𝗽𝗲 𝗖𝗵𝗲𝗰𝗸𝗶𝗻𝗴 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿𝘀: typeof, instanceof 🔤 𝗦𝘁𝗿𝗶𝗻𝗴 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿: + ( for concatenation) 📦 𝗦𝗽𝗿𝗲𝗮𝗱/𝗥𝗲𝘀𝘁 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿: overview of usage 🔄 𝗡𝘂𝗹𝗹𝗶𝘀𝗵 𝗖𝗼𝗮𝗹𝗲𝘀𝗰𝗶𝗻𝗴 𝗢𝗽𝗲𝗿𝗮𝘁𝗼𝗿: ?? (fallback for null/undefined) 🛡️ 𝗢𝗽𝘁𝗶𝗼𝗻𝗮𝗹 𝗖𝗵𝗮𝗶𝗻𝗶𝗻𝗴: ?. (safe access to nested values) ⚡𝗩𝗮𝗿𝗶𝗮𝗯𝗹𝗲 𝗛𝗼𝗶𝘀𝘁𝗶𝗻𝗴: understanding how JS moves declarations Building a deeper understanding of how JavaScript works under the hood! 💪 #JavaScript #FrontendDevelopment #LearningJourney #Sheryians #Cohort2_0 Sheryians Coding School Sheryians Coding School Community
Exploring JavaScript Operators and Hoisting
More Relevant Posts
-
🗓️ 𝐃𝐚𝐲 𝟑𝟕 – JavaScript: Functions Deep Dive Today’s session focused on understanding 𝘧𝘶𝘯𝘤𝘵𝘪𝘰𝘯𝘴 𝘪𝘯 𝘑𝘢𝘷𝘢𝘚𝘤𝘳𝘪𝘱𝘵 — the true building blocks of the language 💡 📘 𝘾𝙤𝙫𝙚𝙧𝙚𝙙 𝘾𝙤𝙣𝙘𝙚𝙥𝙩𝙨: ⚙️ 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻 𝗕𝗮𝘀𝗶𝗰𝘀 – declaration, parameters, arguments 📥 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿𝘀 – required, destructured, rest, default 📤 𝗔𝗿𝗴𝘂𝗺𝗲𝗻𝘁𝘀 – positional, default, spread 🧩 𝗛𝗼𝗶𝘀𝘁𝗶𝗻𝗴 – variable vs function hoisting 🔁 𝗖𝗹𝗮𝘀𝘀𝗶𝗰 & 𝗡𝗲𝘀𝘁𝗲𝗱 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 – understanding scope and the scope chain ⚡ 𝗜𝗜𝗙𝗘 (𝗜𝗺𝗺𝗲𝗱𝗶𝗮𝘁𝗲𝗹𝘆 𝗜𝗻𝘃𝗼𝗸𝗲𝗱 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻 𝗘𝘅𝗽𝗿𝗲𝘀𝘀𝗶𝗼𝗻) – executing functions instantly 🏗️ 𝗔𝗿𝗿𝗼𝘄 / 𝗙𝗮𝘁 𝗔𝗿𝗿𝗼𝘄 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 – concise syntax and lexical this 🕵️ 𝗔𝗻𝗼𝗻𝘆𝗺𝗼𝘂𝘀, 𝗛𝗶𝗴𝗵𝗲𝗿-𝗢𝗿𝗱𝗲𝗿, 𝗖𝗮𝗹𝗹𝗯𝗮𝗰𝗸, 𝗮𝗻𝗱 𝗙𝗶𝗿𝘀𝘁-𝗖𝗹𝗮𝘀𝘀 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 – treating functions as values 🧠 𝗣𝘂𝗿𝗲 & 𝗜𝗺𝗽𝘂𝗿𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 – understanding side effects Each concept made me realize how powerful and flexible functions are in JavaScript! 🚀 #JavaScript #Functions #FrontendDevelopment #LearningJourney #Sheryians #Cohort2_0 Sheryians Coding School Sheryians Coding School Community
To view or add a comment, sign in
-
-
🗓️ 𝐃𝐚𝐲 𝟑𝟖 – JavaScript: Scope, Closures, Arrays & Objects Today’s session covered some of the most powerful and essential JavaScript concepts 👇 🧠 𝗦𝗰𝗼𝗽𝗲 & 𝗖𝗹𝗼𝘀𝘂𝗿𝗲𝘀 : 🌍 𝙎𝙘𝙤𝙥𝙞𝙣𝙜 𝙞𝙣 𝙅𝙖𝙫𝙖𝙎𝙘𝙧𝙞𝙥𝙩 – understanding global and function scope 🔒 𝘾𝙡𝙤𝙨𝙪𝙧𝙚𝙨 & 𝙎𝙘𝙤𝙥𝙞𝙣𝙜 𝙍𝙪𝙡𝙚𝙨 – how inner functions access outer variables 📦 𝗔𝗿𝗿𝗮𝘆𝘀 𝗶𝗻 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 : 📘 What 𝗮𝗿𝗿𝗮𝘆𝘀 are and how to create them ⚙️ 𝘾𝙤𝙢𝙢𝙤𝙣 𝙢𝙚𝙩𝙝𝙤𝙙𝙨 : push(), pop(), shift(), unshift(), indexOf() 🔄 𝘼𝙙𝙫𝙖𝙣𝙘𝙚𝙙 𝙤𝙥𝙚𝙧𝙖𝙩𝙞𝙤𝙣𝙨: filter(), some(), map(), reduce(), slice(), reverse(), sort(), join(), toString() 🧩 𝘼𝙧𝙧𝙖𝙮 𝘿𝙚𝙨𝙩𝙧𝙪𝙘𝙩𝙪𝙧𝙞𝙣𝙜 & 𝙎𝙥𝙧𝙚𝙖𝙙 𝙊𝙥𝙚𝙧𝙖𝙩𝙤𝙧 for efficient handling 🔁 Iterating arrays using 𝙛𝙤𝙧 𝙡𝙤𝙤𝙥 & 𝙛𝙤𝙧𝙀𝙖𝙘𝙝() 🧱 𝗢𝗯𝗷𝗲𝗰𝘁𝘀 𝗶𝗻 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 : 🗝️ Understanding 𝗼𝗯𝗷𝗲𝗰𝘁𝘀 𝗮𝘀 𝗸𝗲𝘆-𝘃𝗮𝗹𝘂𝗲 𝗽𝗮𝗶𝗿𝘀 🛠️ 𝗖𝗿𝗲𝗮𝘁𝗶𝗻𝗴, 𝗮𝗰𝗰𝗲𝘀𝘀𝗶𝗻𝗴, 𝗮𝗻𝗱 𝗱𝗲𝗹𝗲𝘁𝗶𝗻𝗴 properties 🏗️ Working with 𝗻𝗲𝘀𝘁𝗲𝗱 𝗼𝗯𝗷𝗲𝗰𝘁𝘀 Each topic added another layer to understanding how data and scope interact in JavaScript — truly the foundation of dynamic programming! 🚀 #JavaScript #LearningJourney #Sheryians #Cohort2_0 #WebDevelopment Sheryians Coding School Sheryians Coding School Community
To view or add a comment, sign in
-
-
As I continue learning JavaScript, I’m diving deeper into its core concepts. Today, I explored Hoisting, and it helped me understand how JavaScript handles code behind the scenes. What I learned about Hoisting: ~JavaScript moves variable and function declarations to the top of their scope before executing the code. This means: ~Functions can be called before they are declared ~Variables are initialized with undefined during the compilation phase ~Understanding execution context is crucial for clean and predictable code Why this concept is important? Hoisting may seem simple, but it forms the foundation of how JavaScript interprets code. It improves my understanding of: ~Execution phases ~Scope behavior ~Memory allocation ~Writing more structured and bug-free code My learning journey I’m currently focusing on strengthening my fundamentals concepts like: ~Hoisting ~Scope ~Closures ~Event loop ~DOM manipulation These basics are helping me build a strong foundation before moving toward frameworks and advanced topics. Every concept I learn brings me closer to writing cleaner, more efficient JavaScript. #JavaScript #LearningJourney #WebDevelopment #ProgrammingBasics #FrontendDeveloper
To view or add a comment, sign in
-
🚀 JavaScript Learning Journey Topic Covered Today: Hoisting in JavaScript Hey everyone! 👋 Today I explored one of the most interesting concepts in JavaScript — Hoisting! Hoisting is JavaScript’s default behavior of moving declarations to the top of the current scope (before code execution). But the behavior varies depending on how you declare your variables — using var, let, or const. Here’s what I learned 👇 🔹 1. Hoisting with var When we use var, the variable declaration is hoisted, but not the initialization. That means you can access the variable before declaring it — but it will be undefined. console.log(a); // Output: undefined var a = 10; console.log(a); // Output: 10 ✅ Explanation: var a is hoisted to the top, but its value (10) is assigned later. 🔹 2. Hoisting with let Variables declared with let are also hoisted, but they stay in a Temporal Dead Zone (TDZ) until the declaration is encountered. console.log(b); // ❌ ReferenceError let b = 20; console.log(b); // Output: 20 ✅ Explanation: Accessing b before declaration throws a ReferenceError, since it’s not yet initialized. 🔹 3. Hoisting with const Similar to let, const is hoisted but also lives in the TDZ, and it must be initialized at the time of declaration. console.log(c); // ❌ ReferenceError const c = 30; console.log(c); // Output: 30 ✅ Explanation: const variables cannot be accessed before declaration, and must be initialized immediately. 💡 Key Takeaway: var → Hoisted and initialized as undefined. let & const → Hoisted but not initialized (TDZ applies). Always declare variables before using them to avoid unexpected errors! I’m really enjoying this JavaScript learning journey and understanding how these concepts make the language so dynamic. #JavaScript #LearningJourney #WebDevelopment #Coding #Frontend #Hoisting #LetVarConst #JavaScriptTips #LinkedInLearning
To view or add a comment, sign in
-
-
💻✨ Today’s JavaScript Practice Update ✨💻 Today, I explored and practiced JavaScript loops including for, while, and do...while. 🚀 It was an amazing experience learning how these loops simplify repetitive tasks and make code more efficient. 🔹 For Loop: Perfect for running a set of statements a fixed number of times. 🔹 While Loop: Ideal when the number of iterations isn’t known beforehand. 🔹 Do...While Loop: Ensures code runs at least once before checking the condition. Through hands-on coding, I understood how iteration plays a crucial role in automation, logic building, and performance optimization. This practice helped strengthen my problem-solving skills and boosted my confidence in writing clean, logical, and optimized JavaScript code. #JavaScript #Coding #LearningInPublic #WebDevelopment #ProgrammingJourney #ForLoop #WhileLoop #DoWhileLoop #FrontendDevelopment
To view or add a comment, sign in
-
Day 29 of #100DaysOfCode – Deep Dive into JavaScript Operators & Hoisting Today’s session focused on understanding the wide range of JavaScript operators and how they function in real-world code. Key Learnings: Explored different types of operators: arithmetic, comparison, logical, assignment, ternary, type-checking, and string operators. Understood advanced concepts like spread/rest operators, nullish coalescing, and optional chaining. Learned about variable hoisting how JavaScript handles variable declarations internally, and the differences in behavior between var, let, and const. Takeaway: A clear understanding of operator precedence and hoisting helps write cleaner, bug-free, and optimized JavaScript code. Grateful to Harsh Vandana Sharma from Sheryians Coding School for making today’s concepts practical and easy to grasp. #100DaysOfCode #JavaScript #WebDevelopment #CodingJourney #Frontend
To view or add a comment, sign in
-
-
Accidentally Discovered Something Cool in JavaScript! 😎 While working on some JavaScript code, I accidentally came across the ! and !! operators - and it turned out to be a really interesting find 😄 At first, I was confused 🤔 but after a bit of testing, it all made sense! - The ! (NOT) operator converts true -> false, and vice versa. - The !! (Double NOT) operator converts any value into its boolean equivalent value and its great for checking if something is truthy or falsy. This tiny trick makes conditions cleaner and helps when validating inputs or checking existence of values in JavaScript. Tiny discoveries like these remind me how fun it is to explore and learn JavaScript every day! 😊 . . . . . . . #WebDevelopment #JavaScript #Frontend #CodingJourney #LearningByDoing #Developer #Coding #LearningToCode #FrontendDevelopment #DevelopersCommunity #CodingTips #CodeWithMe #CleanCode #CodeBetter #DevLife
To view or add a comment, sign in
-
-
Back with my Day 3 deep dive into JavaScript! 🤯 Today, I tackled Operators and the tricky, often misunderstood world of Type Coercion. This list of questions is a true test of JS knowledge, covering high-level concepts and essential interview-style challenges: Equality Check: Mastering the difference between the equality operator (==) and the strict equality operator (===). Unary & Binary: Understanding post-increment vs. pre-increment (x++ vs. ++x) and complex coercion results (e.g., 5 + "5", true + false). Logical Operators: Deep dive into && (short-circuiting), ||, and the Nullish Coalescing Operator (??). The Quirks: Tackling famous JavaScript "gotchas" like typeof null, NaN == NaN, and complex array/boolean comparisons (e.g., [] == ![]). If you can confidently predict the output for all these, you're a JS wizard! 🧙♂️ Grateful to Sheryians Coding School, Cohort 2.0, for pushing us to truly understand the language's mechanics, not just the syntax. Which of these operator quirks caused you the most confusion when you first started coding? Share your thoughts below! 👇 Connect with me: My GitHub: https://lnkd.in/d7zWUeDG My X: https://lnkd.in/dn3yZDYY #JavaScript #CodingFundamentals #Operators #TypeCoercion #WebDevelopment #SheryiansCodingSchool #Day03
To view or add a comment, sign in
-
💻 Day 41 Exploring Core JavaScript Concepts 🚀 Today’s class was full of core JavaScript learning and some deep insights about what it really means to think like a developer. 💡 We covered topics like: • Functions inside functions, First-class functions, and Higher-order functions • Closures how JS remembers variables even after execution • Arrays and Objects and methods like push(), pop(), splice(), sort(), shift(), unshift(), and more The best part was learning about the developer mindset understanding what today’s generation of developers truly need to focus on: 👉 Not just hard work, but smart work writing cleaner, logical, and efficient code. Each class is helping me connect the dots between concepts, logic, and real world thinking. Loving the process and learning something new every day with Sheryians Coding School. 💪 Harsh Vandana Sharma Sheryians Coding School #JavaScript #WebDevelopment #Frontend #SheryiansCodingSchool #CodingJourney #SmartWork #HardWork #LearningByDoing #Functions #Closures #Arrays #Objects #GrowthMindset
To view or add a comment, sign in
-
-
📘 Important Built-in JavaScript Methods You Must Know JavaScript gives us a treasure of built-in methods that make coding easier, cleaner, and more efficient. In today’s post, I’ve covered some of the most powerful and commonly used JS methods that every developer should master — from arrays and strings to objects and numbers. These methods can save you lines of code, improve readability, and help you write smarter, more elegant JavaScript. 💡 If you want to go from writing code to crafting solutions — this post is for you! 💬 Which JS method do you find yourself using the most? Drop it in the comments 👇 Follow Rensith Udara Gonalagoda for more useful content #learningoftheday #900daysofcodingchallenge #JavaScript #WebDevelopment #FrontendDevelopment #CleanCode #LearnToCode #Programming #CodeBetter
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