💻 JavaScript Beginner Level Practice – Palindrome Check Today I practiced a beginner-level JavaScript program to check whether a string is a palindrome. function isPalindrome(str){ let reversed = str.split("").reverse().join(""); return str === reversed; } console.log(isPalindrome("madam")); 📌 Output: true 💡 Explanation: A palindrome is a word that reads the same forward and backward (for example: madam, level). Input: madam Output: true #JavaScript #BeginnerLevel #CodingPractice #WebDevelopment
JavaScript Palindrome Check Function
More Relevant Posts
-
💻 JavaScript Beginner Level Practice – Count Vowels function countVowels(str){ let vowels = "aeiou"; let count = 0; for(let char of str.toLowerCase()){ if(vowels.includes(char)){ count++; } } return count; } console.log(countVowels("hello world")); 📌 Output: 3 💡 Explanation: This program loops through each character in a string and checks whether it is a vowel (a, e, i, o, u). If it is a vowel, the count increases. #JavaScript #BeginnerLevel #CodingPractice #WebDevelopment
To view or add a comment, sign in
-
-
A very basic VS Code shortcut which is very useful while DOM Manipulation in HTML via JavaScript. 1. Shortcut for directly assigning classes to a tag --> use tag.classname 2. Shortcut for directly assigning ids to a tag --> ise tag#idname #javascript #vscodeshortcuts #tricks VSCode Chrome Extension Devtools
To view or add a comment, sign in
-
🚀 JavaScript Closures — One of the Most Powerful Concepts Many developers use closures in JavaScript without realizing it. 👉 A closure is when a function remembers variables from its outer scope even after the outer function has finished executing. This is why closures are widely used for: • Data privacy • Callbacks • Event handlers • Functional programming patterns Understanding closures will make you much stronger in JavaScript interviews and real-world development. 🎥 I have explained JavaScript Closures step-by-step in this video: https://lnkd.in/ge8NMKu9 If you are learning JavaScript, this concept is a must-know. #javascript #webdevelopment #frontend #programming #javascriptdeveloper
JavaScript Tutorial in Hindi #42 Lexical Scope Explained | Scope Rules + Closure Example #javascript
https://www.youtube.com/
To view or add a comment, sign in
-
💻 JavaScript Beginner Level Practice – Reverse String Today I practiced a simple JavaScript program to reverse a string. function reverseString(str){ return str.split("").reverse().join(""); } console.log(reverseString("hello")); 📌 Output: olleh 💡 Explanation: This program reverses a string using "split()", "reverse()", and "join()" methods. Input: hello Output: olleh #JavaScript #CodingPractice #WebDevelopment #LearningToCode
To view or add a comment, sign in
-
-
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
-
-
🚀 What I Learned Today – JavaScript Basics Today I revised some important concepts in JavaScript: 🔹 Loops (for, while, do-while, for...of, for...in) 🔹 Infinite loop and why it should be avoided 🔹 Strings and how they store text 🔹 String properties (length, indexing) 🔹 Template literals & string interpolation 🔹 String methods (toUpperCase, trim, slice, replace, etc.) Also understood that strings are immutable in JavaScript. Small steps every day to become a better developer 💻 #JavaScript #WebDevelopment #LearningInPublic #CodingJourney
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 18 of Learning JavaScript 💻 Today I learned about event listeners. Example: button.addEventListener("click", function() { console.log("Clicked") }) This allows us to respond to user actions. Now I can make websites interactive. #javascript #frontenddeveloper
To view or add a comment, sign in
-
🚀 30 Days of JavaScript – Day 11 Continuing my journey of improving JavaScript logical thinking by building small interactive programs. 💡 Mini Project: JavaScript Quiz Game This program asks a few questions and calculates the final score based on the user’s answers. 🧠 Concepts Used: • conditional statements • variables • user input with prompt() • string handling using toLowerCase() 🎥 Demo below 👇 Full source code in the First comment. #JavaScript #CodingChallenge #WebDevelopment #LearningJavaScript #ProblemSolving #30DaysOfCode
To view or add a comment, sign in
-
💡 Built a simple interactive Counter using JavaScript! Features include: Increment & Decrement Reset Save & Load A small project, created for JavaScript practice, and it helped me strengthen my concept in DOM manipulation, event handling, and local storage. #JavaScript #WebDevelopment #Coding #Projects #JSPractice
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