• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
JavaScriptSource

JavaScriptSource

Search 5,000+ Free JavaScript Snippets

  • Home
  • Browse Snippets
    • Addon
    • Ajax
    • Buttons
    • Cookies
    • CSS
    • Featured
    • Forms
    • Games
    • Generators
    • Image Effects
    • Math Related
    • Miscellaneous
    • Multimedia
    • Navigation
    • Page Details
    • Passwords
    • Text Effects
    • Time & Date
    • User Details

3 Ways To Round a Number to 2 Decimal Places in JavaScript

How To Round a Number to 2 Decimal Places in JavaScript

In this article, we will look at 3 different ways to round a number to 2 decimal places in JavaScript.

Math Related

How To Insert An Item Into An Array Using JavaScript

How To Insert An Item Into An Array Using JavaScript

In this article, we will explore three different ways to insert an item into an array in JavaScript, including using the push() method, the splice() method, and the concat() method.

Miscellaneous

How To Copy To The Clipboard Using JavaScript

How To Copy To The Clipboard Using JavaScript

The modern and recommended way of copying to the clipboard is by using the Clipboard API, which is a part of the Web API.

Miscellaneous

How To Get a Timestamp in JavaScript

How To Get a Timestamp in JavaScript

Here are a few examples of how to get the timestamp in JavaScript.

Time & Date

How to Check if an Array Includes a Value in JavaScript

How to Check if an Array Includes a Value in JavaScript

In this article, we will explore some of the most common methods for checking for the presence of a value in an array.

Miscellaneous

How to Make the First Letter of a String Uppercase in JavaScript

How to Make the First Letter of a String Uppercase in JavaScript

JavaScript provides several built-in methods for manipulating strings, including one called toUpperCase() which can be used to convert the first letter of a string to uppercase.

Miscellaneous

How To Check if a Checkbox is Checked With JavaScript or jQuery

How To Check if a Checkbox is Checked With JavaScript or jQuery

Checking if a checkbox is checked in JavaScript can be done using the checked property of the checkbox element. This property returns a boolean value indicating whether the checkbox is currently checked or not. Here’s an example of how to check if a checkbox with the ID “myCheckbox” is checked using JavaScript: You can also […]

Forms

How To Generate a GUID in JavaScript

How To Generate a GUID in JavaScript

In JavaScript, there are several libraries and built-in methods that can be used to generate a GUID.

Generators

How To Replace All Occurrences of a String in JavaScript

How To Replace All Occurrences of a String in JavaScript

In JavaScript, there are several ways to replace all occurrences of a string within a larger string.

Miscellaneous

How To Validate an Email Address In JavaScript

How To Validate an Email Address In JavaScript

In this article, we will discuss several methods for validating email addresses in JavaScript, including using regular expressions and built-in JavaScript methods.

Forms

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 34
  • Go to Next Page »

Primary Sidebar

FREE UPDATES!

Get the latest updates in your inbox for FREE!

Popular Posts

Story Generator

IP Grabber – get a users IP address with JavaScript

Simple Calendar

Remove Ads

Astrological Calculator

Copyright © 2023 JavaScriptSource.com

  • About
  • Privacy Policy
  • Submit
  • FAQ
  • Jobs For Developers
  • Contact Us