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
Learning JavaScript: Conditionals and Loops with Sheryians
More Relevant Posts
-
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 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
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
-
-
🗓️ 𝐃𝐚𝐲 𝟑𝟐 – JavaScript: 𝖢𝗈𝗇𝖽𝗂𝗍𝗂𝗈𝗇𝖺𝗅 𝖲𝗍𝖺𝗍𝖾𝗆𝖾𝗇𝗍𝗌, 𝖫𝗈𝗈𝗉𝗌 & 𝖱𝖾𝖼𝗎𝗋𝗌𝗂𝗈𝗇 Today I explored how JavaScript controls program flow and repeats tasks efficiently 👇 🧠 𝗖𝗼𝗻𝗱𝗶𝘁𝗶𝗼𝗻𝗮𝗹𝘀 – if, else-if, else, ternary operator, and switch for decision making 🔁 𝗟𝗼𝗼𝗽𝘀 – for, while, do...while, forEach, for...in, for...of 🪜 𝗥𝗲𝗰𝘂𝗿𝘀𝗶𝗼𝗻 – function calling itself to solve complex problems ⏭️ 𝗟𝗼𝗼𝗽 𝗖𝗼𝗻𝘁𝗿𝗼𝗹 – break & continue statements for better control Learning how to make code smarter and more dynamic 💪 #JavaScript #Cohort2_0 #FrontendDevelopment #LearningJourney #Sheryians Sheryians Coding School Sheryians Coding School Community
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
-
🚀 #Day28 #Cohort2.0| Sheryians Coding School| #Javascript |#part3.2 Today’s session was super interesting . We explored different data types in JavaScript . ✅ Topics Covered: 🔹 Adding comments in JS (single-line & multi-line) 🔹 float 🔹number 🔹 string 🔹 boolean 🔹 null & undefined 🔹 array & object 🔹 Symbol (to be explored deeper with objects) 🔹 NaN (Not-a-Number) 🔹 Infinity 🔹 Difference b/w Primitive vs Reference (Relative) Data Types ✅Key Takeaway: Understanding data types is the foundation for mastering JavaScript logic and memory handling. Thank you Harsh Vandana Sharma bhaiya for such a wonderful lecture and for explaining every concept so clearly and simply. Your teaching style makes learning JavaScript really enjoyable! #Cohort2.0. #javascript #learning #frontenddevelopment #webdevelopment #programming #cohortlearning
To view or add a comment, sign in
-
-
🚀 Day 35 - Deep Dive into Loops | JavaScript Today’s session took our JavaScript journey to the next level! We explored advanced looping concepts through Level-2 problem-solving exercises, combining for, while, and user interactions with prompt(). 💡 Key Learnings: 🔹 Strengthened logical thinking through real-world problems. 🔹 Broke down complex tasks into smaller, manageable steps. 🔹 Wrote dynamic code that interacts with user input. 🔹 Used loops and conditionals to generate specific outputs and patterns. 🧠 Harsh Bhaiya guided us to approach each challenge strategically first understanding the problem, visualizing loop flow, and then crafting efficient solutions. His advice reminded us that true learning happens when we struggle, reason, and solve independently. Each question solved today added to my confidence and made me appreciate how loops truly power logic in programming. Feeling proud, prepared, and excited to take on even tougher challenges ahead! 💪 📚 Student at: Sheryians Coding School #JavaScript #WebDevelopment #CodingJourney #LearningEveryday #SheryiansCodingSchool #ProblemSolving
To view or add a comment, sign in
-
-
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 35 of #100DaysOfCode – Functions, Recursion & Do-While Loop in JavaScript Today’s learning focused on some of the most important programming fundamentals in JavaScript: Key Learnings: Do-While Loop → Understanding how it executes the block at least once before checking the condition Functions in JavaScript → Structure, reusability, and clean code Arguments vs Parameters → How data is passed and handled Rest Parameters → Efficient way to work with variable number of inputs Recursion → Calling functions within themselves to solve repeating subproblems Hoisting → Variable Hoisting — behavior differences between var, let, and const Function Hoisting — how JavaScript moves function declarations to the top during execution Takeaway: Functions and recursion unlock powerful logic possibilities, and understanding hoisting helps avoid unexpected bugs. These concepts form the backbone of writing optimized and predictable JavaScript code. A big thanks to Harsh Vandana Sharma from Sheryians Coding School and Sheryians Coding School Community for making function mechanics and hoisting concepts easy to understand with practical examples. #100DaysOfCode #JavaScript #Functions #Recursion #WebDevelopment #CodingJourney #Frontend
To view or add a comment, sign in
-
-
Day 13 of #30DaysOfJavaScript on LeetCode Today's Challenge: 2621 — Sleep Today’s challenge explored the basics of asynchronous timing in JavaScript — creating a custom sleep() function that pauses execution for a given duration using promises. Here’s my solution 👇 async function sleep(millis) { return new Promise(resolve => setTimeout(resolve, millis)); } This simple problem reinforces how promises and setTimeout() work together to handle delays asynchronously. Understanding this helps build a solid foundation for mastering async behavior in JavaScript. Try it out here: https://lnkd.in/g6WC5mu7 #JavaScript #LeetCode #CodingChallenge #LearningJourney #30DaysOfCode #AsyncAwait #Promises #Programming #Developers #Learning
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
Don't waste your time on "Noname Coding School" use this: https://javascript.info/