What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-25 22:59:03
javascript map return array with distinc values
//ES6 let array = [ { "name": "Joe", "age": 17 }, { "name": "Bob", "age": 17 }, { "name": "Carl", "age": 35 } ]; array.map(item => item.age) .filter((valu... Add solution -
Javascript 2021-09-25 12:03:03
lastindexof js
string.lastIndexOf(searchValue[, fromIndex]) Add solution -
Javascript 2021-09-25 09:06:03
get file extension file upload control in javascript
function getFile(filePath) { return filePath.substr(filePath.lastIndexOf('\\') + 1).split('.')[0]; } function getoutput() { outputfile.value = getFile(inputfile.value); extension.value = inputfile.value.split('.')[1]; } Add solution -
Javascript 2021-09-25 03:06:04
array remove element js
var colors = ["red","blue","car","green"]; var carIndex = colors.indexOf("car");//get "car" index //remove car from the colors array colors.splice(carIndex, 1); // colors = ["red",&... Add solution -
Other 2021-09-24 12:00:04
arr.remove
var colors = ["red","blue","car","green"]; var carIndex = colors.indexOf("car");//get "car" index //remove car from the colors array colors.splice(carIndex, 1); // colors = ["red",&... Add solution -
Html 2021-09-24 05:15:02
html ecommerece search box
<div class="row"> <div class="left" style="background-color:transparent;"> <h3 style="text-align: center;">Plants</h3> <input type="text" id="mySearch" ... Add solution -
Javascript 2021-09-24 03:49:04
show only three caraters email javascript
function hideemail(target) { var email = target //[email protected] var hiddenEmail = ""; for (i = 0; i < email.length; i++) { if (i > 2 && i< email.indexOf("@") ) { hiddenEmail += "*"; ... Add solution -
Javascript 2021-09-23 17:13:02
angular browser detector
import {Injectable} from '@angular/core'; @Injectable({ providedIn: 'root' }) export class BrowserDetectorService { private browser: string; private version: number | string; private os: any; private versionSearchString: any; private dataB... Add solution