JS Tutorial #3: Functions Title: JS Tutorial #3: Functions in JavaScript Content: Functions are reusable blocks of code. They help organize your program. Code snippet: function greet(name) { return `Hello, ${name}!`; } console.log(greet("Cognothink")); Engagement: Write a function that takes two numbers and returns their sum. Try it out! #JavaScript #WebDevelopment #Coding #LearnJS #Cognothink
How to create a JavaScript function for sum of two numbers
More Relevant Posts
-
Learning by building: wrote a simple JS program that takes a number and prints its multiplication table with clean loops, input validation, and readable template strings. Small steps, consistent commits, better logic every day. 🚀 #JavaScript #VSCode #100DaysOfCode #BuildInPublic”
To view or add a comment, sign in
-
-
💻 Day 3 of #100DaysOfCode > 🚀 Today I learned about JavaScript Loops — one of the most powerful concepts for repeating tasks! 🔁 The 5 main types of loops in JavaScript: 1️⃣ for loop 2️⃣ while loop 3️⃣ do...while loop 4️⃣ for...of loop 5️⃣ for...in loop 💡 Loops make our code efficient and clean by reducing repetition. #100DaysOfCode #JavaScript #WebDevelopment #CodingJourney #FullStackDeveloper
To view or add a comment, sign in
-
-
🧩 Day 41 | Classes & Default Parameters Today’s focus was on Classes & Default Parameters — how structure, encapsulation, and flexibility elevate JavaScript’s power. ✨ Key Insight: Classes help organize code; default parameters make it smarter and reusable. 🔗 GitHub: https://lnkd.in/dtdU9-zZ #WebDevelopment #JavaScript #CodingJourney #OOP
To view or add a comment, sign in
-
-
💻 Day 2 — Learning to Think in Logic 🧠 Today was all about decision making in JavaScript — learning how code “thinks.” I explored conditional statements: if, else if, switch, and even played around with alert, prompt, and error handling. It’s wild how these simple tools form the foundation of every program’s logic. Each concept feels like another small piece of the bigger picture coming together. Still early days — but every line of code is one step closer to clarity and confidence. 🌱 #Day2 #CodingJourney #MERNStack #LearnInPublic #JavaScript
To view or add a comment, sign in
-
-
🚀Day 94 of #100DaysOfCode Today I learned about function expressions in JavaScript! Instead of creating a function with a name, you can store an anonymous function inside a variable. Function expressions are great for passing functions as values, using them as arguments, or keeping your code modular and flexible. #JavaScript #FunctionExpression #Learning #100DaysOfCode
To view or add a comment, sign in
-
-
Mastering JavaScript Functions — From Basics to Advanced! I’ve just built a complete reference file covering all JavaScript function concepts — from declarations and arrow functions to closures, callbacks, async/await, and even generators! Every section includes a clear definition, explanation, and live example — all written cleanly so you can run it directly in VS Code. This project helped me deeply understand how functions work behind the scenes in JavaScript, including concepts like hoisting, ‘this’ behavior, and higher-order functions. #JavaScript #WebDevelopment #CodingJourney #DeveloperCommunity #100DaysOfCode #LearnToCode #JSFunctions #FrontendDeveloper #CodeWithYagsy #JavaScriptLearning
To view or add a comment, sign in
-
JS Tutorial #4: Conditional Statements Title: JS Tutorial #4: If-Else Statements Content: Conditional statements let your program make decisions. Code snippet: let score = 75; if(score >= 50) { console.log("Pass"); } else { console.log("Fail"); } Engagement: Change the score variable and see what happens. Can you add else if for a grade system? #JavaScript #WebDevelopment #Coding #LearnJS #Cognothink
To view or add a comment, sign in
-
“Boost your JavaScript skills with this clean and minimal guide to essential string methods! 📚✨ Learn how to manipulate and work with strings in JavaScript using practical examples for each method. Perfect for beginners and seasoned developers alike. Save and share to keep these tips handy! #JavaScript #Coding #WebDevelopment #ProgrammingTips”
To view or add a comment, sign in
-
-
🚀 Day 19 of JS series by Rohit Negi Today, I learned about one of the most important concepts in modern JavaScript — Promises! Here’s what I explored 👇 ✅ What a Promise is and how it’s created ✅ How to handle Promises using .then() and .catch() ✅ What JSON (JavaScript Object Notation) is. It is independent of programming languages ✅ How Promises help solve the callback hell problem #JavaScript #WebDevelopment #LearnInPublic #AsyncJS #Promises #CodingJourney
To view or add a comment, sign in
-
-
🧠 Day 45 of #100DaysOfFullStackChallenge Today I explored one of the most powerful hooks in React — useEffect() ⚛️ It helps in handling side effects like fetching data, managing timers, and logging component updates. Learning how dependency arrays and cleanup functions work gave me a deeper understanding of React’s lifecycle 🔄 Every small concept adds up to something bigger — staying consistent and curious 🚀 #React #useEffect #FrontendDevelopment #100DaysOfCode #LearningJourney #WebDevelopment #JavaScript #DeveloperLife
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