Suman Shrestha

Snippets | Suman Shrestha

Code Snippets & Insights

18 articles

JavaScript Local Storage and Session Storage

Persist data in the browser with Web Storage APIs

JavaScript Error Handling Best Practices

Handle errors gracefully in JavaScript with try-catch and custom error types

JavaScript Modules (ES6 Import/Export)

Organize code with JavaScript's native module system

Understanding JavaScript Closures

Master closures for powerful function patterns and data encapsulation

JavaScript Spread and Rest Operators

Use the spread and rest operators for flexible array and object manipulation

JavaScript Destructuring Assignment

Extract values from arrays and objects with concise destructuring syntax

Alpine.js Fundamentals

Add interactivity to your HTML with Alpine.js lightweight JavaScript framework

JavaScript Promises and Async/Await

Handle asynchronous operations elegantly with Promises and async/await syntax

Essential JavaScript Array Methods

Master the most useful JavaScript array methods for data manipulation and transformation

Debounce and Throttle in JavaScript

Control the rate of function execution with debounce and throttle techniques

Alpine.js Magic Properties

Understanding $el, $refs, $dispatch, $nextTick, and $watch in Alpine.js.

Building a Reusable Modal in Alpine.js

Creating an accessible, keyboard-friendly modal component using Alpine.js.

Managing State in Alpine.js

Moving beyond component-local state with Alpine.js Stores.

The Importance of is-odd Package in JavaScript

Learn why the is-odd package is essential for JavaScript developers.

Handling localStorage Availability in JavaScript

Learn how to handle localStorage availability in JavaScript and fallback to a temporary storage solution.

Loading more articles...

-

Need one on one help with Laravel and its ecosystem?

Talk to me now if you need my help. Click here