What will be the output of the following JavaScript code? console.log([] + []); console.log([] + {}); console.log({} + []); 💬 Drop your answers below without running the code! #JavaScript #Developers
JavaScript Array and Object Concatenation
More Relevant Posts
-
0ms Delay... but what about the extra arguments? 🧐 Most developers know setTimeout(callback, delay), but did you know you can pass arguments directly into the callback? #JavaScript #WebDevelopment #CodingQuiz #SoftwareEngineering #FrontendTips
To view or add a comment, sign in
-
Day 95 / 365 👨💻 Focused on steady React practice. 🧩 Built a small feature in an existing component 🔁 Handled state updates more smoothly ⚙️ Simplified some conditional logic 🧠 Focused on writing cleaner components #365DaysOfCode #React #JavaScript #Frontend
To view or add a comment, sign in
-
JavaScript: Mirror Distance Problem Day 5 👈 Goal: Find the mirror distance of a number — the absolute difference between the number and its reversed form. Approach: Reverse the given number using modulo (%) and division. Subtract the reversed number from the original. Take the absolute value to ensure a positive result. Example: Input: 123 Reversed: 321 Mirror Distance: |123 - 321| = 198 #JavaScript #TypeScript #DSA #CodingInterview #ProblemSolving #FrontendDevelopment #Developers #100DaysOfCode
To view or add a comment, sign in
-
-
Day 107 / 365 👨💻 Focused on small improvements. 🧩 Refined a component structure 🔁 Managed state updates more clearly ⚙️ Simplified conditional rendering 🧠 Focused on writing cleaner React code #365DaysOfCode #React #JavaScript #Frontend
To view or add a comment, sign in
-
I once fixed a performance issue… Didn’t change logic. Didn’t add caching. Just replaced a loop with Promise.all() Speed went 📈 Sometimes the problem isn’t scale… it’s how you write async code. #SoftwareEngineering #NodeJS #JavaScript #Performance #DevTips
To view or add a comment, sign in
-
-
Hoisting is a behavior in JavaScript where variable and function declarations are conceptually moved to the top of their containing scope (either the global script or a specific function) during the compilation phase, before the code is actually executed. It is important to understand that your code isn't physically moved anywhere. Instead, the JavaScript engine allocates memory for variable and function declarations before it executes the code line-by-line. #javascript #hoisting #frontend #scripting
To view or add a comment, sign in
-
-
Day 93 / 365 👨💻 Focused on refining basics through practice. 🧩 Revisited component structure and props 🔁 Tracked state changes during interactions ⚙️ Cleaned up small parts of the code 🧠 Focused on making logic easier to follow #365DaysOfCode #React #JavaScript
To view or add a comment, sign in
-
Day 1/30 Write a function createCounter. It should accept an initial integer init. It should return an object with three functions. The three functions are: increment() increases the current value by 1 and then returns it. decrement() reduces the current value by 1 and then returns it. reset() sets the current value to init and then returns it. #30DaysOfCode #JavaScript #LeetCode #WebDevelopment #ProgrammingChallenge #CodingLife
To view or add a comment, sign in
-
-
Day 1 — Reverse a String (JavaScript) Problem Write a function that reverses a given string. Example Input: "hello" Output: "olleh" Approach Start from the last character of the string and iterate backwards. Keep adding each character to a new string until the loop finishes. Code function reverseString(str){ let reversed = "" for(let i = str.length - 1; i >= 0; i--){ reversed += str[i] } return reversed } console.log(reverseString("hello")) What I Learned Basic string traversal and how iteration works from the end of a string. #javascript #frontenddeveloper #codingpractice #dsa
To view or add a comment, sign in
-
-
Day 113 / 365 👨💻 Maintained consistency with focused practice. 🧩 Improved a small component detail 🔁 Observed state updates in different scenarios ⚙️ Simplified some conditional logic 🧠 Focused on cleaner and predictable code #365DaysOfCode #React #JavaScript #Frontend
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