⚡ JavaScript & TypeScript Daily Refresher #113 👉 How do you ensure a user-provided URL is safe in JavaScript? 💡 I create a new URL() object and then check its protocol. If it’s not https:, I treat the URL as unsafe and reject it. ✨ I post daily JS/TS refreshers — follow for the next one! #JavaScript #TypeScript #WebSecurity #WebDevelopment
Majid Abbasi’s Post
More Relevant Posts
-
⚡ JavaScript & TypeScript Daily Refresher #116 👉 What is a prototype in a JavaScript object? 💡 A prototype is an internal object that JavaScript uses for inheritance. When a property or method isn’t found on an object, JavaScript looks it up in its prototype chain. ✨ I post daily JS/TS refreshers — follow for the next one! #JavaScript #TypeScript #Prototypes #WebDevelopment
To view or add a comment, sign in
-
Most people learn JavaScript functions but very few understand why there are so many ways to write them. Function declaration, expression, arrow, IIFE… each exists for a real reason in real projects. Once you understand when to use what, JavaScript starts making sense. Saving this for future reference 📌 #JavaScript #FrontendDevelopment #WebDevelopment
To view or add a comment, sign in
-
-
🔴 Stop using any in TypeScript Why any is bad: ❌ Removes type safety ❌ Can hide bugs Why unknown is better: ✅ Makes you check the type first ✅ Keeps your code safe Quick rule: If you want to use any, ask: “Do I really not know the type, or am I just taking a shortcut 😕?” 💡 Most of the time, unknown is the better option. #TypeScript #JavaScript #WebDevelopment #SoftwareEngineering
To view or add a comment, sign in
-
Most JavaScript beginners misunderstand delete 👇 delete works only on object properties, ❌ not on variables ❌ not on function parameters And if a property is non-configurable, it fails silently. #JavaScript #WebDevelopment #Frontend #CodingTips #DeveloperJourney
To view or add a comment, sign in
-
-
✨ What is a 𝗧𝗿𝗮𝗻𝘀𝗽𝗶𝗹𝗲𝗿 used for in #JavaScript? A transpiler (source-to-source compiler) takes modern JavaScript code (ES6+, ESNext) and converts it into older, widely supported JavaScript (usually ES5). The most popular example is Babel – it lets us write clean arrow functions, classes, async/await, optional chaining and more… while still running perfectly in older browsers and environments. Do you already use a transpiler (consciously :D) in your workflow? Share in the comments! #CleanCodeSolutions #WebDevelopment #JavaScript #Babel
To view or add a comment, sign in
-
-
In DevOps we work a lot with YAML. But YAML only describes data. The meaning lives entirely in the controllers that consume it. Concrete example: A GitOps notification messageTemplate references .Updated.Changes. After a controller upgrade the field becomes .Changed.Changes. The YAML is still valid and the intent is unchanged but CI fails because the internal data model changed. Tools like Helm or Kustomize render YAML, but they don’t protect intent when controller internals or template fields evolve. We have no real transpilers that adapt old intent to new controller versions. Similar to how Babel outputs JS for a specific runtime, treating YAML more like compiled output instead of static config would save a lot of pain. Until then, logs help us bridge the gap. 😂 #DevOps #GitOps #FluxCD #CI #BonnConsulting
✨ What is a 𝗧𝗿𝗮𝗻𝘀𝗽𝗶𝗹𝗲𝗿 used for in #JavaScript? A transpiler (source-to-source compiler) takes modern JavaScript code (ES6+, ESNext) and converts it into older, widely supported JavaScript (usually ES5). The most popular example is Babel – it lets us write clean arrow functions, classes, async/await, optional chaining and more… while still running perfectly in older browsers and environments. Do you already use a transpiler (consciously :D) in your workflow? Share in the comments! #CleanCodeSolutions #WebDevelopment #JavaScript #Babel
To view or add a comment, sign in
-
-
⚡ JavaScript & TypeScript Daily Refresher #118 👉 How can you prevent prototype-related security issues in JavaScript? 💡 I use hasOwnProperty (or Object.hasOwn) to ensure a property belongs to the object itself, not its prototype — this helps prevent issues like prototype pollution. ✨ I post daily JS/TS refreshers — follow for the next one! #JavaScript #TypeScript #WebSecurity #PrototypePollution
To view or add a comment, sign in
-
Day 7/30 – JavaScript Challenge 🚀 Built a Random Quote Generator using JavaScript 💬 On each button click, a random quote is selected from an array and displayed dynamically. GitHub: https://lnkd.in/djJ-NtGi #JavaScript #WebDevelopment #LearningInPublic #30DaysOfCode
To view or add a comment, sign in
-
-
When traditional <script> tags are unavailable, an alternative approach involves embedding JavaScript code within a javascript: pseudo-protocol handler to trigger function execution using JS FUCK https://lnkd.in/dBYiZh9G #js #xss #javascript #jsFuck
To view or add a comment, sign in
-
-
⚡ JavaScript & TypeScript Daily Refresher #114 👉 How do you prevent an SSRF attack in JavaScript? 💡 I use an allowlist approach — only predefined, trusted URLs or hosts are permitted. If the user input is outside this list, I immediately throw an error and block the request. ✨ I post daily JS/TS refreshers — follow for the next one! #JavaScript #TypeScript #WebSecurity #BackendDevelopment
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