JavaScript

Unveiling JavaScript: Exploring Multiple Options to Format Numbers as Currency

JavaScript has several built-in and third-party ways to format a number as currency. Here are the ones worth knowing, and when to reach for each. 1. toLocaleString: built into JavaScript, formats a number according to the given locale: 2. Intl.NumberFormat: part of the ECMAScript Internationalization API, gives more control than toLocaleString and is the modern […]

Unveiling JavaScript: Exploring Multiple Options to Format Numbers as Currency Read More »

How to Send an HTTP Request in SharePoint via JavaScript

Plain fetch() or XMLHttpRequest work fine for hitting SharePoint’s REST API — the part that’s actually SharePoint-specific isn’t the HTTP call itself, it’s the headers: an Accept header SharePoint’s OData implementation expects, and a request digest token required on anything that isn’t a GET. In this post: A GET request: fetching list items · A

How to Send an HTTP Request in SharePoint via JavaScript Read More »