Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

How to remove text from a string in javscript

var ret = "data-123".replace('data-','');
console.log(ret);   //prints: 123
Comment

PREVIOUS NEXT
Code Example
Javascript :: express js server 
Javascript :: nextjs path alias 
Javascript :: summation of array elements 
Javascript :: asignar val select2 js 
Javascript :: load a page with ajax 
Javascript :: is javascript variable also an object 
Javascript :: discord.js random message 
Javascript :: append before parent jquery 
Javascript :: rgb to hex js 
Javascript :: javascript to help find overflow elements 
Javascript :: s3 list objects in folder node js 
Javascript :: onload multiple functions 
Javascript :: check if function is async javascript 
Javascript :: remove animation css javascript 
Javascript :: react js empty build 
Javascript :: get 5 months after date in javascript 
Javascript :: copy to clipboard react native 
Javascript :: discount calculations javaScript 
Javascript :: style react background 
Javascript :: nghide angular 10 
Javascript :: sort a dictionary by value in javascript 
Javascript :: committing only some changes to git 
Javascript :: how to iterate through an array in javascript 
Javascript :: send xmlhttprequest with axios 
Javascript :: convert a string to a number in javascript 
Javascript :: axios download excel file 
Javascript :: window vue remove event listener 
Javascript :: scrollheight jquery 
Javascript :: set css variable from javascript 
Javascript :: jquery reset form fields 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =