🚀 30 Days of JavaScript – Day 10 Today I built a small logical puzzle game called Bulls & Cows. The program generates a secret number and the player must guess it. After each guess, the program gives hints using Bulls (correct digit & position) and Cows (correct digit but wrong position). 🧠 Concepts Used: • loops • string indexing • conditional logic • problem-solving approach 🎥 Demo below 👇 Full source code in the comments. #JavaScript #CodingChallenge #ProblemSolving #WebDevelopment #LearningJavaScript
More Relevant Posts
-
JavaScript Number Guessing Game I just built a Number Guessing Game in JavaScript! 🎯 💡 Features: Random number generation (1-100) User input validation Hints: “Too high” / “Too low” Counts attempts Exit anytime This project helped me practice loops, conditionals, variables, and working with user input in JavaScript. Try it yourself! Code runs in the browser console or Node.js with prompt-sync. 💻 Skills practiced: JavaScript fundamentals, logic, problem-solving #JavaScript #Coding #WebDevelopment #LearningByDoing
To view or add a comment, sign in
-
-
🚀 30 Days of JavaScript – Day 12 Can you solve these number puzzles? 🤔 Today I built a small JavaScript program that asks 3 number pattern questions and calculates the final score. 🧠 Concepts Used: conditional statements user input with prompt() variables and score tracking 🎥 Demo below 👇 Full source code in the First comment. #JavaScript #CodingChallenge #ProblemSolving #LearningJavaScript #WebDevelopment
To view or add a comment, sign in
-
> Day 12/21 : JavaScript Control Flow As part of my 21-Day Full Stack Revision Challenge, today I revised control flow in JavaScript, which helps programs make decisions and repeat tasks. Control flow is important because it allows the program to execute different actions based on conditions. > Topics I Covered If–Else Statements – Used to execute code based on conditions Switch Statements – A cleaner way to handle multiple conditions Loops – Used to repeat a block of code multiple times > Why It Matters Control flow helps developers build logical and dynamic programs by controlling how and when code runs. Day 12 completed #FullStackDeveloper #JavaScript #WebDevelopment #LearningInPublic #21DaysChallenge #CodingJourney
To view or add a comment, sign in
-
Built a little browser game over the weekend using just vanilla JavaScript. No frameworks, no libraries — one HTML file. Move your cursor to destroy enemies, survive boss waves, grab power-ups. Runs at 60fps with particle effects and procedural audio. Sometimes the best way to sharpen your skills is to build something fun. Try it: https://lnkd.in/gQGEcv-v #JavaScript #WebDev #CreativeCoding
To view or add a comment, sign in
-
-
🚀 What I Learned Today – JavaScript Arrays Today I explored Arrays in JavaScript and here are the key takeaways 👇 🔹 Arrays are a collection of items 🔹 They are linear (elements stored sequentially) 🔹 Arrays are mutable (can be changed after creation) 📌 Array Indices Positions of elements in an array (starting from 0) 📌 Looping Through Arrays Used to print or access all elements easily 📌 Useful Array Methods ✔️ push() – add element to end ✔️ pop() – remove element from end ✔️ unshift() – add element to start ✔️ shift() – remove element from start ✔️ toString() – convert array to string ✔️ concat() – merge arrays ✔️ slice() – get part of array (no change to original) ✔️ splice() – modify array (add/remove/replace) 💡 Example: slice(start, end) splice(start, deleteCount, newElement) Learning step by step and building strong fundamentals 💪 #JavaScript #WebDevelopment #CodingJourney #FrontendDevelopment #100DaysOfCode)
To view or add a comment, sign in
-
-
Day 14 of my JavaScript journey 🚀 Built a Quiz Game using HTML, CSS, and JavaScript. Users can answer multiple-choice questions, get instant feedback, and track their score. This project helped me practice: • DOM manipulation • Event handling • Conditional logic • Dynamic score tracking 🔗 Live Demo: https://lnkd.in/gSjTeEFb 💻 GitHub Repo: https://lnkd.in/gAp_RjRK Building more interactive and logic-based projects day by day. 💻 #JavaScript #WebDevelopment #FrontendDeveloper #100DaysOfCode #CodingJourney
To view or add a comment, sign in
-
Day 12 #100DaysOfCode 💻 Today I learned about Synchronous vs Asynchronous JavaScript, especially how setTimeout() and setInterval() work. JavaScript runs code synchronously by default (line by line). But functions like "setTimeout()" run asynchronously, meaning they execute later without blocking the main thread. Example: console.log("1"); setTimeout(() => { console.log("2"); }, 0); console.log("3"); Output: 1 3 2 Even with "0ms", "setTimeout" goes to the callback queue, so the synchronous code runs first. Understanding this concept helped me see how JavaScript handles non-blocking tasks. #JavaScript #AsyncJavaScript #WebDevelopment #CodingJourney #Akbiplob
To view or add a comment, sign in
-
Day 44 of showing up, and consistency is starting to compound 🚀 Today’s challenge focused on counting digit occurrences in squared numbers—a simple concept that really tests attention to detail and iteration logic. 💡 Breaking the problem down into smaller steps made it much easier to handle and debug. What stood out is how even basic loops and string conversions can build strong problem-solving foundations when used correctly. 🔍 The real win? Staying consistent and improving a little every single day. 📈 On to the next challenge. #100DaysOfCode #CodingJourney #JavaScript #ProblemSolving #Consistency #LearningInPublic #DeveloperGrowth
To view or add a comment, sign in
-
-
Today I revised an important concept in JavaScript – Arrow Functions. Arrow functions help write shorter and cleaner functions compared to traditional functions. I practiced examples like addition, subtraction, and multiplication using arrow functions. Consistent practice is helping me strengthen my JavaScript fundamentals and improve my problem-solving skills. #JavaScript #WebDevelopment #FrontendDevelopment #CodingPractice #LearningJourney
To view or add a comment, sign in
-
-
learned about the switch statement in JavaScript. It is used when we need to check multiple conditions. Example: let day = 2; switch(day){ case 1: console.log("Monday"); break; case 2: console.log("Tuesday"); break; default: console.log("Another day"); } Switch statements make code cleaner when handling many conditions. #JavaScript #CodingJourney #FrontendDeveloper
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
let secret = "427"; // secret number let guess = prompt("Guess the 3-digit number:"); while (guess !== secret) { let bulls = 0; let cows = 0; for (let i = 0; i < 3; i++) { if (guess[i] === secret[i]) { bulls++; } else if (secret.includes(guess[i])) { cows++; } } guess = prompt( bulls + " Bulls 🐂 , " + cows + " Cows 🐄. Try again:" ); } alert("Correct! The number was " + secret);