Today I learned about Session in JavaScript! Many beginners think JavaScript doesn’t support sessions, but actually we can manage session-like data easily using sessionStorage. 👉 It helps us store data temporarily — only until the browser or tab is open 🧠 In short: Data lives only for the current browser tab. Perfect for login status or temporary info. Deletes automatically when tab closes. Next, I’ll try the same concept with localStorage (which stores data even after browser close)! #JavaScript #WebDevelopment #Learning #Frontend #CodingJourney #DeveloperLife
How to use sessionStorage in JavaScript for temporary data
More Relevant Posts
-
✨ Today I learned something simple but powerful in JavaScript — Removing duplicates & flattening arrays! These two tricks help keep your data clean and easy to work with. 🚀 🔹 Remove Duplicates from an Array Using Set (fast & clean): const numbers = [1, 2, 2, 3, 4, 4, 5]; const uniqueNumbers = [...new Set(numbers)]; console.log(uniqueNumbers); // [1, 2, 3, 4, 5] --- 🔹 Flatten a Nested Array Using flat(): const nested = [1, [2, [3, 4]], 5]; const flatArray = nested.flat(2); console.log(flatArray); // [1, 2, 3, 4, 5] --- 🔥 These small improvements help write cleaner, more readable code. If you're learning JavaScript, definitely try these out! #JavaScript #Learning #WebDevelopment #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
Understanding Variables in JavaScript Today, I explored one of the core fundamentals of JavaScript — Variables. Variables act as containers for storing data, and they play a major role in how programs handle, update, and manage information. JavaScript provides three ways to declare variables: var, let, and const. Each behaves differently in terms of scope, reassignment, and hoisting — making it important to choose the right one based on the requirement. 🔍 Key Points I Learned ✔️ Variables store dynamic values like numbers, strings, arrays, objects, etc. ✔️ var → function-scoped, older way, can lead to unexpected behavior ✔️ let → block-scoped, ideal for values that change ✔️ const → block-scoped, used for fixed values (cannot be reassigned) ✔️ ES6 improved code reliability by introducing let and const Building strong fundamentals like variables helps in writing cleaner, predictable, and modern JavaScript code. 🚀 Grateful to my mentor Sudheer Velpula for guiding and encouraging consistent learning. 🙌 #JavaScript #Variables #WebDevelopment #Frontend #CodingJourney #ES6 #ProgrammingBasics #LearnJavaScript #TechLearning #DeveloperCommunity
To view or add a comment, sign in
-
-
#Todays Thought with small Javascript Code 👍 const learnFromEverything = (sources) => { sources.forEach((s, i) => { console.log(`${i + 1}. Learned from ${s} — takeaway: stay curious`); }); }; const sources = ["colleague", "code review", "mistake", "coffee chat"]; learnFromEverything(sources);
To view or add a comment, sign in
-
-
Today I learned three powerful JavaScript methods: map(), filter(), and reduce() 🧠 These methods make working with arrays super efficient — instead of writing long loops, you can do everything in just a few lines of clean code! map() → transforms each element filter() → filters elements based on condition reduce() → reduces all elements into a single value (like sum or total) Learning how they work together really changed the way I think about data manipulation in JS 😍 #JavaScript #FrontendDevelopment #CodingJourney #WebDevelopment #LearningEveryday
To view or add a comment, sign in
-
#Day2Nov #dailylearning 💡 What is a Closure in JavaScript? A closure is created when a function remembers and accesses variables from its outer function — even after the outer function has finished executing. In simple words, 👉 A closure lets a function use values that were in scope when it was created. 🧠 Example: function outer() { let count = 0; function inner() { count++; console.log(count); } return inner; } const counter = outer(); counter(); // 1 counter(); // 2 Here, inner() still remembers the variable count from outer() — that’s a closure! 🔍 Why Closures are Useful: To remember data between function calls To create private variables Used in data hiding and function factories #masiverse #WebDevelopment #Javascript #learning
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
-
🚀 Episode 02: JavaScript on the Server! 🧠 Today, I explored how JavaScript—once a purely client-side language—made its way to the server-side with the help of Node.js. 💻 Here are some key takeaways from this episode: 🔹 A server is basically a remote computer that provides resources or services over a network. 🔹 IP Address uniquely identifies every device on the internet. 🔹 V8 Engine, written in C++, powers JavaScript by compiling it into machine code, making it super fast! ⚡ 🔹 Node.js is a C++ application that embeds the V8 engine, enabling JavaScript to run outside the browser. 🔹 Node.js follows ECMAScript standards, but also extends JavaScript with additional capabilities like APIs, database connections, and server operations — making it a full JS runtime environment. Ever wondered how your JavaScript code “comes to life”? 🤔 The V8 engine translates your high-level JS code into low-level machine instructions — the actual language your computer understands. That’s how your code becomes action! 🧩 #JavaScript #NodeJS #WebDevelopment #LearningJourney #V8Engine #ServerSideJS #MERNStack #Coding
To view or add a comment, sign in
-
Today I started exploring Big O Notation in JavaScript. I’m learning DSA from the Next Level Web Development Bootcamp, and honestly, this topic first looked super confusing. But after spending some time with it, I kind of understood the first 3 — O(1), O(n), and O(n²). Here’s how I understood it (in simple words): O(1) → fixed time, like accessing an array item. O(n) → time increases as data increases, like looping through an array. O(n²) → loop inside a loop — takes way more time as data grows. I didn’t understand everything yet, just exploring slowly and trying to make sense of it with small code examples: https://lnkd.in/eNXYxT6j How did you first understand Big O? Any beginner-friendly resources or analogies? #NextLevelProgramming #LearningInPublic #JavaScript #BigONotation #DSA
To view or add a comment, sign in
-
-
🚀 Mastering JavaScript step by step! Learning how this powerful language makes the web truly interactive. 📚 Topics I’ve covered so far: Variables, Data Types & Operators Functions & Scope DOM Manipulation Events & Event Handling Arrays & Objects Loops & Conditions ES6 Features (let, const, arrow functions, spread/rest) Promises, Async & Await Fetch API & JSON Error Handling Modules & Classes #JavaScript #WebDevelopment #Frontend #Coding #LearningJourney #Developer
To view or add a comment, sign in
-
Problem - 2 series of — “JavaScript 0 → Hero” Every few days, I’ll post a short JavaScript problem — from the basics to advanced — to help you think like a developer 👨💻 You’ll get: 🧩 Real-world JS puzzles 🧠 Step-by-step explanations 💬 Community discussions in the comments Whether you’re just starting out or brushing up your skills, this series will help you level up one challenge at a time. 🔔 Follow me and turn on notifications to join the journey! Comment down the answer 👇 hashtag #JavaScript #CodingChallenge #WebDevelopment #Learning #trending #leetcode
To view or add a comment, sign in
-
More from this author
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