What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-20 20:44:03
string reduction javascript
// method to extend String to call reduce the same way as an Array String.prototype.reduce = function () { return this.split().reduce(...arguments); } // sum of the ascii codes using the newly created String prototype method str.reduce((a,b) => a... Add solution -
Javascript 2021-09-18 16:38:02
crm toolbox webresources manager intellisense
// A namespace defined for the sample code // As a best practice, you should always define // a unique namespace for your libraries var Sdk = window.Sdk || {}; (function () { // Define some global variables var myUniqueId = "_myUniqueId"... Add solution -
Javascript 2021-09-18 09:24:02
javascript countdown timer including days
function startTimer(duration, display) { var timer = duration, minutes, seconds; setInterval(function () { minutes = parseInt(timer / 60, 10); seconds = parseInt(timer % 60, 10); minutes = minutes < 10 ? "0" +... Add solution -
Javascript 2021-09-16 19:51:02
add a route to a buttoin in angular
<button type="button" class="btn btn-primary-outline pull-right" (click)="btnClick();"><i class="fa fa-plus"></i> Add</button> // myComponent.component.ts file import { Router } from '@... Add solution -
Javascript 2021-09-15 15:12:02
js id generator
var ID = function () { // Math.random should be unique because of its seeding algorithm. // Convert it to base 36 (numbers + letters), and grab the first 9 characters // after the decimal. return '_' + Math.random().toString(36).substr(2, 9); }; Add solution -
-
Javascript 2021-09-13 05:59:04
js arrow anonymous function
let show = function () { console.log('Anonymous function'); }; //… can be shortened using the following arrow function: let show = () => console.log('Anonymous function'); //Similarly, the following anonymous function: let add = function (a... Add solution -
Javascript 2021-09-10 05:26:01
js random id
var ID = function () { // Math.random should be unique because of its seeding algorithm. // Convert it to base 36 (numbers + letters), and grab the first 9 characters // after the decimal. return '_' + Math.random().toString(36).substr(2, 9); }; Add solution
Best helpers
Ranking is empty