🚀 Day 12:– JavaScript + DSA (Java) 🔹 JavaScript: ✅ Learned reduce() function deeply (accumulator, current value, initial value). ✅ Explored Set and its important properties: set.add(value) set.delete(value) set.has(value) set.clear() set.size Stores only unique values ✅ Practiced Map and its methods: map.set(key, value) map.get(key) map.has(key) map.delete(key) map.clear() map.size Can store any type of key (objects, numbers, etc.) 🔹 DSA: Entered into the world of Recursion and solved basic problems like: Print 1 to N Print N to 1 Sum of N numbers Fibonacci Factorial And more…... #JavaScript #DSA #Recursion #WebDevelopment #CodingJourney
JavaScript & DSA Learning Update: Reduce, Set, Map, Recursion
More Relevant Posts
-
Abstraction - Java Script · Abstraction means hiding internal implementation details and showing only the essential features to the user. · In JavaScript, abstraction can be achieved using: · Classes · Private fields (#) · Closures YouTube Link: https://lnkd.in/gwJCZP3K
Abstraction - JavaScript
https://www.youtube.com/
To view or add a comment, sign in
-
🚀 Day 15:– JavaScript + DSA (Java) I learned: 🌐 Global Object & globalThis The Global Object is like a library containing all functions and variables accessible globally. In browsers, it’s window; in Node.js, it’s global. globalThis gives a uniform reference to the global object across environments. Inside functions, this behaves differently based on mode: Non-strict mode: this → global object Strict mode: this → undefined 🔹 Inside Objects & Methods this refers to the object that owns the method: const obj = { name: "Kaushal", greet: function() { console.log(this.name); // Kaushal } } obj.greet(); Arrow functions don’t have their own this, they inherit from the surrounding scope. 🔹 Constructors & Classes this points to the instance being created: class Person { constructor(name, age) { this.name = name; this.age = age; } } let a = new Person("Kaushal", 20); console.log(a); // Person {name: "Kaushal", age: 20} 💻 Also explored in Java: Generating all binary strings of a given length without consecutive 1s ✅ LeetCode #22-->Attempted balanced parentheses problem →still a work in progress 😅 #JavaScript #Java #LeetCode #CodingJourney #100DaysOfCode #LearningByDoing
To view or add a comment, sign in
-
🚀 Day 14:– JavaScript + DSA (Java) & DSA Progress Today was a productive learning day! 🔹JavaScript Concepts Learned: I explored how JavaScript code actually works behind the scenes. ✅ JavaScript is a synchronous(Synchronize means ek ke baad ek), single-threaded language — it executes one command at a time in a specific order. ✅ Learned about the Execution Context: When a JavaScript program runs, a Global Execution Context is created. It has two phases: Memory Creation Phase Code Execution Phase ✔ In the memory phase, variables are stored as key–value pairs. ✔ If a variable is declared using var, it is allocated memory and initialized with undefined. ✔ Accessing a var variable before initialization results in undefined due to hoisting. ✅ Understood the Temporal Dead Zone (TDZ): Variables declared with let and const are hoisted but not initialized, and accessing them before declaration throws an error.(jab koi bhi variable temporal deadzone ke andar hota hai then hum usko access nahi kr sakte) ✅ Learned how the Call Stack works: How execution contexts are pushed into the stack How the stack grows and shrinks during function calls Understanding the Global Execution Context and Function Execution Context clearly hosting says that jo bhi aapke variable hai code me unka decleration top pr chala jayega 🔹 DSA (Java) Progress: 💻 Solved LeetCode Problem #78 – Subsets Also practiced finding the Greatest Common Divisor (GCD) using recursion (Euclidean Algorithm). #JavaScript #WebDevelopment #DSA #Java #LeetCode #LearningJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 22 :- JavaScript + DSA (Java) 💻 JavaScript – Event Listeners I explored how websites respond to user actions using event listeners. Mouse Events click – triggers when a user clicks on an element dblclick – triggers when a user double-clicks on an element mouseover – triggers when the mouse pointer enters an element mousemove – triggers whenever the mouse moves inside an element Keyboard Events keydown – triggers when a key is pressed down keyup – triggers when a key is released Event Object The event object provides information about the interaction happening in the browser: event – the main object created when an event occurs event.target – the element that triggered the event event.type – the type of event that occurred event.key – shows which keyboard key was pressed event.clientX – horizontal mouse position in the viewport event.clientY – vertical mouse position in the viewport 🧠 Java (DSA) Today I learned about Cyclic Sort and solved : LeetCode Problem #268 – Missing Number (using 4 different approaches): 1️⃣ Sorting Approach :- Used built-in sorting and then checked which index didn’t match the value. 2️⃣ Boolean Array Approach : Used an extra boolean array to mark numbers that appear and find the missing one. 3️⃣ Mathematical (Sum) Approach: Applied the formula for the sum of first n numbers and subtracted the array sum. 4️⃣ Optimal Approach (Follow-up Requirement) : Solved it with Time Complexity: O(n) and Space Complexity: O(1). Learning multiple approaches to the same problem really helps strengthen problem-solving skills. #Day22 #JavaScript #DSA #Java #LeetCode #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Node.js is more than just JavaScript on the server. Behind the scenes it combines V8 Engine, C++ bindings, and libuv to deliver an event-driven, non-blocking architecture capable of handling thousands of concurrent requests. Understanding these internals helps developers build high-performance and scalable backend systems. Grateful for the continuous guidance from Hitesh Choudhary Sir, Piyush Garg Sir for guiding this learning journey. #NodeJS #BackendDevelopment #JavaScript #SystemDesign #SoftwareEngineering #DevCommunity #EventLoop #V8Engine #chaicode https://lnkd.in/gfrMmZ-T
To view or add a comment, sign in
-
While learning JavaScript deeply, I came across a concept that completely changed how I think about variables. In JavaScript, variables don’t have types — values do. Unlike languages like Java or C++, where a variable’s type is fixed, JavaScript variables are just containers that can reference different kinds of values over time. Example: let x = 10; // number x = "hello"; // string x = true; // boolean The variable x stays the same, but the value (and its type) changes. Understanding this simple idea makes many JavaScript behaviors — like dynamic typing and type coercion — much easier to reason about. I wrote a short post explaining this concept clearly. Check it out here: https://lnkd.in/gMZ-ESa3
To view or add a comment, sign in
-
-
💡 Same function name. Same call. Different languages… different outcomes. Here’s a simple comparison 👇 🔹 JavaScript ```javascript function add(a, b) { return a + b; } function add(a, b, c) { return a + b + c; } console.log(add(1, 2, 3, 4)); ``` 👉 Output: 6 (extra argument is ignored, last function overrides previous) 🔹 C# ```csharp void Add(int a, int b) { } void Add(int a, int b, int c) { } Add(1, 2, 3, 4); ``` 👉 Output: Compile-time error ❌ (No method matches 4 parameters) ⚖️ Key Comparison: ✔ JavaScript • Flexible with arguments • Ignores extra values • Function overriding (last one wins) • Can silently introduce bugs ✔ C# • Strong method overloading • Strict parameter matching • No extra arguments allowed • Errors caught early 🎯 Takeaway: What works in one language may fail in another. #JavaScript #CSharp #Programming #Developers #CodingTips #Tech
To view or add a comment, sign in
-
Why localStorage and sessionStorage in JavaScript? In JavaScript, localStorage and sessionStorage are part of the Web Storage API. They are used to: Store data in the browser Save user data without a database Keep data even after page refresh. . . . . . . . . . #javascript #html #programming #coding #css #java #python #programmer #developer #webdevelopment #webdeveloper #coder #code #php #webdesign #codinglife #softwaredeveloper #computerscience #software #reactjs #technology #frontend #development #tech #linux #javascriptdeveloper #frontenddeveloper #programmers #softwareengineer #web
To view or add a comment, sign in
-
I hate writing the .gitignore file from scratch, so this tool is my go-to solution. It generates a clean, tailored .gitignore file in seconds for any framework or programming language 🔥 Just a quick search, and I’ve got an organized file that keeps my project clutter-free without the extra hassle! Tool Link 🔗: https://lnkd.in/dPY8UB6k Hope this helps ✅️ Do Like 👍 & Repost 🔄 #html #css #javascript #typescript #react
To view or add a comment, sign in
-
JSON is commonly used in APIs and web applications to send and receive structured data. It is easy for humans to read and easy for machines to parse.. . . . . . . . . . #JavaScript #JS #WebDevelopment #Coding #Programming #FrontendDevelopment #BackendDevelopment #FullStack #WebDesign #Tech #Developer #CodeNewbie #JavaScriptFrameworks #NodeJS #ReactJS #VueJS #Angular #HTML #CSS #TechCommunity #hackforge
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