Day 31 of #100DaysOfCode – Building Logic with Conditions and Loops in JavaScript Today’s session focused on strengthening core programming logic using conditional statements and loops. Key Learnings: Understood how if, else if, and else conditions control program flow. Explored looping structures to execute repetitive tasks efficiently. Learned how combining these concepts helps in building real-world logic and problem-solving patterns. Takeaway: Mastering loops and conditions is the foundation for writing efficient, dynamic, and logical code in JavaScript. Grateful to Harsh Vandana Sharma from Sheryians Coding School and Sheryians Coding School Community for guiding us through today’s session with clear explanations and practical logic-building examples. #100DaysOfCode #JavaScript #WebDevelopment #CodingJourney #Frontend #ProgrammingLogic
Learning JavaScript Logic with Conditions and Loops
More Relevant Posts
-
Day 34 | Cohort 2.0 Journey🔁✨ Today’s session was all about controlling the flow of logic in JavaScript by Harsh Vandana Sharma from Sheryians Coding School learning how decisions and repetitions are handled inside programs. 🧠 Key Concepts Covered: 🔹 if, else if, and else : Basic conditional branching 🔹 Truthy & Falsy Values : Understanding values like 0, "", undefined, NaN, null, and even document.all 🔹 Ternary Operator : Shorter way to write conditions 🔹 Switch Case : Cleaner multi-condition handling 🔹 Loops : Starting with for loop to repeat actions efficiently These are the real backbone of logic writing, helping us make our code smart, dynamic, and interactive ⚡ #Day34 #JavaScript #Conditionals #Loops #FrontendDeveloper #Cohort2 #LearningJourney #SheryiansCodingSchool
To view or add a comment, sign in
-
🚀 Day 4 | 30-Day Coding Challenge – Educative.io Today’s problem: Find the single non-duplicate element in a sorted array. At first, I explored the simple O(n) approaches — 🔹 Using a Set to track duplicates (O(n) time + O(n) space) 🔹 Summing unique vs. total values and finding the difference (O(n) time) 🔹 Linear scan comparing curr and next (O(n) time, O(1) space) All worked… but the goal was O(log n) time and O(1) space. Then it clicked 💡 — since the array is sorted, every pair of equal numbers appears side-by-side. Before the unique element, pairs start at even indices; after it, they start at odd indices. Using this pattern with binary search, I halved the search space each step: if nums[mid] == nums[mid+1] → move right else move left. Every challenge so far is sharpening how I reason about patterns and constraints rather than just syntax. #Day4 #30DaysOfCode #Educative #JavaScript #BinarySearch #ProblemSolving #DSA #LearningInPublic
To view or add a comment, sign in
-
Day 33 — Loops & Conditions Practice | 2.0 Job-Ready AI-Powered Cohor Sheryians Coding School🚀 Today was all about hands-on coding with JavaScript loops & conditionals. Practiced real logic-building exercises like: ✅ Print numbers 1 to 10 ✅ Print even numbers using loops + condition ✅ Print numbers 10 to 1 (reverse loop) ✅ Print "YES" 5 times using a loop ✅ Ask a number → check positive or negative ✅ Ask user's age → check voting eligibility ✅ Multiplication table of 5 using loop ✅ Understand & handle edge cases with if-else The more I practice these logic patterns, the more comfortable I get with problem-solving in JavaScript 💪 #JavaScript #WebDevelopment #Frontend #CodingPractice #SheryiansCodingSchool #100DaysOfCode #DeveloperJourney
To view or add a comment, sign in
-
-
Day 38 — More Functions & Arrays | 2.0 Job-Ready AI-Powered Cohort Sheryians Coding School🚀 Today’s session covered deeper JavaScript fundamentals: ✅ More Function Concepts Anonymous, higher-order, callback, first-class functions Pure vs impure functions ✅ Understanding Scope Global, local, block scope ✅ Closures What closures are and why they’re useful ✅ Arrays Creating arrays, accessing elements Methods: push, pop, shift, unshift, filter, indexOf, spread operator Looping arrays with for and forEach ✅ Objects Creating, accessing, modifying objects Nested objects & object methods Bit by bit, JavaScript is getting clearer and more powerful 🔥 #JavaScript #WebDevelopment #Frontend #SheryiansCodingSchool #Arrays #Functions
To view or add a comment, sign in
-
-
Day 7 of Learning JavaScript from Sheryians Coding School Today, I have learned about loops, recursion, and functions. do...while: Executes the code inside the "do" block at least once and then checks the condition in "while". The loop continues based on the condition. Recursion: A function calling itself is known as recursion. It continues until a specific condition is met. Loop Control: continue: Skips the current iteration of the loop and moves to the next one. Functions: A function does not execute immediately; it runs only when called. A function can be called multiple times. Arguments: Used to access values that are passed when the function is called. Hoisting in Functions: Functions can be accessed or called even before they are declared. #JavaScript #WebDevelopment #CodingJourney #LearningWithSheryians #ProgrammingConcepts
To view or add a comment, sign in
-
Day 31 | Cohort 2.0 Journey Yesterday was fully dedicated to practising basic JavaScript problems with Harsh Vandana Sharma from Sheryians Coding School — an important step toward building strong logic and confidence in coding. A few key takeaways from today’s session: ✅ Breaking problems into small, manageable steps ✅ Understanding inputs → process → outputs ✅ Using operators, conditions & loops to solve real tasks ✅ Improving thinking patterns through trial & error Every solved problem feels like leveling up 💪 #Day31 #JavaScript #ProblemSolving #LogicBuilding #LearningJourney #FrontendDeveloper #Cohort2 #SheryiansCodingSchool
To view or add a comment, sign in
-
Day 30 of my Cohort 2.0 journey with Sheryians Coding School Today's session was all about mastering JavaScript Operators one of the most important topics for building logic in programming. We explored: + Arithmetic Operators - performing basic calculations Assignment Operators - updating and assigning values Comparison Operators - comparing values for conditions Logical Operators - combining multiple conditions Bitwise Operators - working on binary levels Ternary & Type Operators - writing cleaner, smarter code Understanding these operators helped strengthen the foundation of JavaScript logic and problem-solving. Each topic adds a new layer of clarity and confidence. #Day30 #JavaScript #WebDevelopment #Cohort2 #Frontend Development #Sheryians CodingSchool #LearningJourney #CodingSkills #TechGrowth
To view or add a comment, sign in
-
-
Day 33 | Cohort 2.0 Journey Today was a full hands-on problem-solving session with Harsh Vandana Sharma from Sheryians Coding School applying all the concepts learned so far about JavaScript operators and logic building. We solved multiple exercises using: ⚙️ Arithmetic, Comparison & Logical operators This kind of practice helps in truly understanding how and when to use each operator effectively — not just memorizing them! Every problem solved = one more step toward mastering JavaScript 🚀 #Day33 #JavaScript #ProblemSolving #Operators #FrontendDeveloper #LearningJourney #Cohort2 #SheryiansCodingSchool
To view or add a comment, sign in
-
Day 6 of Learning JavaScript from Sheryians Coding School Today, I have learned about Conditionals and Loops. Conditionals: if: Inside this block, a condition is tested that returns true or false. Falsy values: 0, "", NaN, null, false, undefined, document.all Truthy values: Everything other than falsy values. else: Executes when the if condition is false. else if: Executes when the if condition fails, but another specific condition needs to be checked. Ternary Operator: condition? true: false Switch: Used to check multiple conditions. You can create multiple cases inside a switch. Each case runs when the passed condition matches the case value. Always write a break after each case to stop further execution. Loops: There are two main types of use cases: 1. Straightforward loop: The value and printed result do not change. 2. Dynamic loop: Both the value and printed output can change. For Loop: for (start; end; change) { } Used to repeat a block of code multiple times. You can start the loop from any value, for example, 100, 1999, or 6778 in a straightforward loop. #JavaScript #WebDevelopment #CodingJourney #LearningWithSheryians #ProgrammingBasics
To view or add a comment, sign in
-
🚀 [Day 11/30] Coding Challenge #30DaysOfCode 💡 Problem: Set Matrix Zeroes Today’s challenge tested my ability to balance time and space complexity efficiently — the task was to modify a matrix such that if any element is 0, its entire row and column should be set to zero. I explored multiple approaches before reaching an optimal one 👇 1️⃣ Brute Force Approach: I iterated through the entire matrix, and whenever I found a 0, I used a helper function to mark all elements in its row and column as -1. After completing this marking process, I did another pass to convert all -1 values to 0. ✅ Simple logic, but inefficient due to multiple passes and extra checks. 2️⃣ Using Extra Arrays: Next, I maintained two separate arrays — one for rows and one for columns — to keep track of which rows and columns should become zero. This improved clarity and avoided redundant marking. 🧠 Time Complexity: O(m × n) | Space Complexity: O(m + n) 3️⃣ Optimized In-Place Solution: Finally, I optimized further by using the first row and first column of the matrix itself as markers — eliminating the need for extra space. This reduced the space complexity to O(1) while maintaining O(m × n) time complexity. ✨ It was fascinating to see how a small shift in perspective (reusing the same matrix for storage) made the solution much more elegant and efficient. 🔍 Key Takeaways: Always aim to optimize space without compromising clarity. Sometimes, the best memory to use is the one already in use! 😄 Breaking a problem into stages (brute force → optimized) builds strong problem-solving intuition. eager for next day challenge with Educative. #Day11 #CodingChallenge #Educative #DSA #ProblemSolving #JavaScript #LearningJourney #KeepCoding #Matrix #Optimization #CleanCode
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