
Learn how to use Math.random to generate random numbers in JavaScript and create random colors, letters, strings, phrases, passwords, & more.
Learn how to use Math.random to generate random numbers in JavaScript and create random colors, letters, strings, phrases, passwords, & more.
Learn how to transform the character case of a string — to uppercase, lowercase, and title case — using native JavaScript methods.
Learn about methods for rounding numbers in JavaScript: rounding up, rounding down, rounding to decimal places, and gotchas to avoid.
Learn how to split a string into substrings in JavaScript with both the substring() and split() methods, and how to choose which one to use.
Learn how to convert numbers to ordinals in JavaScript. Getting the ordinal of a number allows you to display it in a human-readable format.
Learn three simple ways to convert a string into a number in JavaScript, with simple-to-follow examples and tips on which method to use.
Learn four simple ways to convert a number into a string in JavaScript, with simple-to-follow examples and tips on which method to use.
This post introduces a utility function for applying padding to strings and numbers.
Read High-Performance String Concatenation in PHP and learn with SitePoint. Our web development and design tutorials, courses, and books will teach you HTML, CSS, JavaScript, PHP, Python, and more.
Read High-performance String Concatenation in JavaScript and learn with SitePoint. Our web development and design tutorials, courses, and books will teach you HTML, CSS, JavaScript, PHP, Python, and more.