Posts for javascript snippet

How to Capitalize Text with JavaScript

In this article, you will learn to Capitalize Text with JavaScript. JavaScript has built-in methods like .toLowerCase() – to convert text to lower case – and .toUpperCase() – to convert text to upper case. However, there’s no built-in method to convert text to title case i.e. “How Are You”. However, we can combine .toUpperCase() with […]

May 7, 2020 in Snippets

JavaScript Snippet – Download Picture/Video

There are a couple of ways to download media assets on the web. One of them involves making an HTTP request to the location of the media asset and using JavaScript inbuilt methods to manipulate the asset. To get started, we add a button to our markup that would trigger the download. We add an […]

May 5, 2020 in Snippets