Format currency EASY in JavaScript 💲
// .toLocaleString() = returns a string with a language
// sensitive representation of a number
// .toLocaleString("locale", {options});
let number = 123456.789;
number = number.toLocaleString("en-US");
number = number.toLocaleString("hi-IN");
number = number.toLocaleString("de-DE");
number = number.toLocaleString(undefined);
number = number.toLocaleString("en-US", {style: "currency", currency: "USD"});
number = number.toLocaleString("hi-IN", {style: "currency", currency: "INR"});
number = number.toLocaleString("de-DE", {style: "currency", currency: "EUR"});
console.log(number);
Видео Format currency EASY in JavaScript 💲 канала Bro Code
// sensitive representation of a number
// .toLocaleString("locale", {options});
let number = 123456.789;
number = number.toLocaleString("en-US");
number = number.toLocaleString("hi-IN");
number = number.toLocaleString("de-DE");
number = number.toLocaleString(undefined);
number = number.toLocaleString("en-US", {style: "currency", currency: "USD"});
number = number.toLocaleString("hi-IN", {style: "currency", currency: "INR"});
number = number.toLocaleString("de-DE", {style: "currency", currency: "EUR"});
console.log(number);
Видео Format currency EASY in JavaScript 💲 канала Bro Code
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
PHP while loops explainedMongoDB how to find documentsMongoDB sorting and limiting explainedLearn Python DECORATORS in 7 minutes! 🎊JavaFX FlowPane 🌊PHP string functions are awesomePHP how to insert into MySQL databasePython SORTING is... quite something! 🔀Learn Python MAP() in 3 minutes! 🗺️Learn Python DATES & TIMES in 6 minutes! 📅CSS shadow (#6) 👥PHP how to sanitize/validate inputPython MULTIPLE INHERITANCE is easy! 🐟Let's code a HANGMAN GAME in Python! 🕺Python PyQt5 add CSS-like properties easy! 🎨Python PyQt5 CHECKBOXES are easy! ✅MongoDB logical operators explainedMongoDB data types explainedPHP for loops explainedLet's code a DIGITAL CLOCK in Python! 🕒