Learning JavaScript – Basics I Covered Today Today I learned some fundamental concepts of JavaScript and how it actually runs 👇 🔹 How JavaScript is executed JavaScript runs inside the browser using a JS engine (like V8). With Node.js, JavaScript can also run outside the browser. 🔹 What is ECMAScript? ECMAScript is the standard that defines how JavaScript should work. JavaScript follows ECMAScript rules (ES6, ES7, etc.). 🔹 What is Node.js? Node.js is a JavaScript runtime It allows us to run JavaScript outside the browser Created by Ryan Dahl Useful for backend development, APIs, servers, etc. 🔹 Basic JavaScript Code I Practiced console.log("Hello World"); function addThreeNumbers(a, b, c) { return a + b + c; } let result = addThreeNumbers(1, 2, 54); console.log(result); 🔹 What does console.log() do? console.log() is used to print output It helps in debugging and checking values Output of above code will be: Hello World 📌 Key takeaway: JavaScript is not limited to browsers anymore — with Node.js, it can power full backend applications too. Learning step by step and building strong fundamentals 💪 #JavaScript #NodeJS #ECMAScript #WebDevelopment #LearningJourney #Frontend #Backend #100DaysOfCode
Learning JavaScript Fundamentals with Node.js and ECMAScript
More Relevant Posts
-
A New JavaScript Framework? In this Economy? Sigment is the latest framework to offer a streamlined, "no-build" alternative to the complexity of React. Find out how Sigment simplifies.
To view or add a comment, sign in
-
Today I focused on understanding how JavaScript handles tasks and started my journey into Node.js backend development. Here’s what I learned 👇 📌 Synchronous vs Asynchronous Functions 🔹 Synchronous (Sync) Tasks run one after another, only one thing at a time. Example: Make Maggi → boil water → chop vegetables → go to the market if ketchup is missing. You wait for one task to finish before starting the next. This approach is time-consuming. 🔹 Asynchronous (Async) Multiple tasks happen using context switching. Example: Start boiling water, then chop vegetables while water is boiling. Ask someone to bring ketchup while you continue cooking. This saves time and improves performance. 🔹 Common async examples in JavaScript: setTimeout() fs.readFile() fetch() Even though JavaScript is single-threaded, it handles async tasks using context switching and the event loop. 📌 JavaScript & ECMAScript Learned about ECMAScript: It defines how JavaScript should be written and standardized. JavaScript engines: V8 (Chrome) SpiderMonkey (Firefox) 📌 Node.js Internals Node.js is created by taking the V8 engine and adding extra features like: File system access Networking capabilities V8 compiles JavaScript into native machine code before executing it locally. 🔹 Also learned about Bun: Another JavaScript runtime like Node.js Faster than Node.js in many cases Can be used as an alternative backend runtime 📌 HTTP & Backend Basics Understood what HTTP is and how: Frontend communicates with backend using HTTP requests Learned about: HTTP requests HTTP status codes 📌 Hands-on Practice Used npm init -y to initialize a Node.js project. Created a basic backend using Node.js. Tested APIs using Postman. Learned an important lesson: In a function, req should be used before res. When I used res before req, it showed an error. This was my Day 2 progress. Learning is challenging, but I’m enjoying every step and improving day by day 💪 #Day2 #JavaScript #AsyncProgramming #NodeJS #BackendDevelopment #LearningInPublic #MERNStack #Consistency
To view or add a comment, sign in
-
-
Another JavaScript framework enters the scene. But this one question is whether build steps and React-era complexity are still worth it, as Loraine Lawson explores.
To view or add a comment, sign in
-
💡 Understanding the Difference Between null and undefined in JavaScript 💻 In JavaScript, null and undefined are two distinct types that represent "absence of value," but they are used in different contexts. Knowing the difference can help you avoid bugs and write cleaner, more predictable code. In this post, I dive into the practical usage of these two concepts, and show how understanding them can make your code more robust—especially when dealing with APIs, error handling, or conditional checks. Swipe through to see examples and why this knowledge is essential for every JavaScript developer! 🔍 #JavaScript #DesignPatterns #FrontendDevelopment #WebDevelopment #DeveloperLife #nodejs #backend #backenddeveloper
To view or add a comment, sign in
-
If you work with JavaScript, you know how often you forget small but important details. I put together a complete JavaScript quick reference guide that covers: – fundamentals – arrays & objects – async / await – DOM manipulation – advanced concepts with real examples It’s meant to be bookmarked and reused. Read here: https://lnkd.in/gNun7kxB
To view or add a comment, sign in
-
So, you're building something with JavaScript - and it's getting big. One file just isn't cutting it anymore. JavaScript module system to the rescue. It's like a librarian for your code, helping you keep things tidy and organized. You can break up your code into smaller, reusable files - and control what's visible, what's not. Only load what you need, when you need it. Modern JavaScript is all about ES Modules (ESM), by the way. They're the way to go. Here's the lowdown: - You can have named exports and imports, which is super useful. - Default exports and imports are a thing too. - And then there's aliasing - which helps you avoid naming conflicts, like when you're working with multiple modules that have the same variable names. - Namespace imports are another cool feature - you can import all values from a module as an object. - Combined imports are also possible - you can import both default and named exports at the same time. - And let's not forget dynamic imports - which load modules at runtime, like when you need to load a big library, but only when the user interacts with a certain part of your app. A JavaScript module is basically a file with its own scope - it's like a little box that can export variables, functions, or classes, and import values from other modules. To use modules in the browser, just add type="module" to your script tag. Easy peasy. You can export multiple values from one file, no problem. Just remember, when you import them, the names have to match. And you can only have one default export per module - but you can import it with any name you want, which is nice. Aliasing is also super helpful - it lets you rename imports to avoid conflicts. Dynamic imports are pretty cool too - they load modules at runtime, which is great for code splitting, lazy loading, and performance optimization. They always return a Promise, so you can use Promise.all to load multiple modules in parallel. So, what's the big deal about the JavaScript module system? It makes your code easier to maintain, more scalable, and better organized - which is a win-win-win. Check out this article for more info: https://lnkd.in/gBPF8NUr #JavaScript #ESModules #CodeOrganization
To view or add a comment, sign in
-
Most people think JavaScript only lives in the browser. That used to be true. Not anymore. So what actually happens when JavaScript runs on a server? ECMAScript is just the rulebook. It defines how JavaScript should behave. JavaScript is the language we write. V8 is the engine. Its job is simple but powerful: execute JavaScript code. It’s written in C++ for speed. Node.js is not a language. It’s a runtime that uses V8 and connects JavaScript to the operating system. That’s how JS can read files, handle network requests, and talk to databases. A browser is also a runtime. It runs JavaScript, but its main focus is UI, DOM, and user interaction. A server is simply an always-on machine. Node.js lets JavaScript live there, 24/7, handling requests. Under the hood, C++ does the heavy lifting. JavaScript stays clean and expressive, while C++ handles performance. If you’re learning backend with Node.js, understanding this mental model changes everything. #JavaScript #NodeJS #BackendDevelopment #WebDevelopment #Programming #SoftwareEngineering #LearningInPublic #TechCareers
To view or add a comment, sign in
-
Finally putting my JavaScript notes into words! 🚀 Hi everyone! If you know me, you know I’ve been living and breathing JavaScript for a long time. I’ve spent years understanding its quirks, but I’ve never actually sat down to document it, until now. Today, I published my first article on Medium! It's the start of a deep-dive series where I’m taking everything I know about JS and turning it into a structured guide for others. 𝗣𝗮𝗿𝘁 1 𝗰𝗼𝘃𝗲𝗿𝘀 𝘁𝗵𝗲 "𝗙𝗼𝘂𝗻𝗱𝗮𝘁𝗶𝗼𝗻𝘀": * The chaotic history of the "Browser Wars." • How the V8 engine translates your code. • Why "Just-In-Time" (JIT) compilation is the secret to JS speed. • The truth about Stack vs. Heap memory. I’m really excited to finally get this out of my head and onto the page. I hope you find it helpful, whether you’re just starting or just need a refresher! Check it out here: https://lnkd.in/dZ4FJjWG 🔗 𝗡𝗲𝘅𝘁 𝘂𝗽 𝗶𝗻 𝘁𝗵𝗲 𝘀𝗲𝗿𝗶𝗲𝘀: A deep dive into 𝗛𝗼𝗶𝘀𝘁𝗶𝗻𝗴. Stay tuned! #JavaScript #WebDevelopment #CodingLife #Medium #TechCommunity #SoftwareEngineering
To view or add a comment, sign in
-
JavaScript Fundamentals - Part 3 Hoisting It is behavior of processing declarations before executing code. In simple terms: - JavaScript knows about variables and functions before running the code - This happens during the memory creation phase of an execution context So, hoisting is not moving code upward rather its preparing memory upfront. Why hoisting exists - its is side effect of how JS creates execution contexts. Before execution: - memory is allocated - identifiers are registered - scope is set up This allows: - function calls before their definition - predictable scope resolution Hoisting by Declaration Type var hoisting console.log(a); var a = 10; What happens: - a is hoisted - initialized with undefined - assigned 10 during execution So, console.log(a); // undefined Function Declaration Hoisting sayHi(); function sayHi(){ console.log("Hi"); } What happens: - entire function is hoisted - function can be called before declaration let and const Hoisting console.log(b); let b = 20; // ReferenceError: Cannot access 'b' before initialization What happens: - b is hoisted - but not initialized - exists in TDZ - Function Expressions sayHello(); var sayHello = function() { console.log("Hello"); }; What happens; - sayHello is hoisted as undefined - function body is not hoisted Result: TypeError: sayHello is not a function TDZ -it is the time between entering a scope and initializing let or const variable - variable exists - but cannot be accessed - prevents accidental usage before declaration TDZ is not special zone in memory, it is a state of a binding between hoisting and initialization { // TDZ starts console.log(a); //ReferenceErrror let a = 10; // TDZ ends } So, based on our above details, how can you describe Hoisting in one line ? Please follow for Part 4 updates. 👍 #javascriptfundamentals #uideveloper #corejs
To view or add a comment, sign in
-
Popular Article: Add Some Class to Your JavaScript, By Paul Sheriff This article by Paul Sheriff introduces the ES6 JavaScript class keyword. He explores how to create classes, use constructors, define properties (public, read-only, write-only), and implement inheritance using extends, helping you write more organized, maintainable, and reusable code. Read the full article published in CODE Magazine here: bit.ly/4r5shG9
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