Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

convert currency to string javascript

var currency = "-$4,400.50";
var number = Number(currency.replace(/[^0-9.-]+/g,""));
Comment

PREVIOUS NEXT
Code Example
Javascript :: CastError: Cast to ObjectId failed for value "undefined" at path "_id" for model 
Javascript :: if between two numbers javascript 
Javascript :: javascript onclick button 
Javascript :: preloader js code 
Javascript :: convert associative array to json javascript 
Javascript :: jquery detect textarea change 
Javascript :: run function once javascript 
Javascript :: javascript element onblur 
Javascript :: selector id jquery but is variable 
Javascript :: javascript two decimal places after division 
Javascript :: how is javascript compiled 
Javascript :: hover material ui styles 
Javascript :: nodejs routes 
Javascript :: disabling submit button until all fields have values 
Javascript :: css class list 
Javascript :: check if number is decimal or integer js 
Javascript :: uppercase javascript using function 
Javascript :: String.toLower() js 
Javascript :: mongoose put request 
Javascript :: checkbox default value and checked value get in jquery 
Javascript :: str replace javascript all 
Javascript :: useeffect dependency error 
Javascript :: js date in two weeks 
Javascript :: input type email react js-validation 
Javascript :: how to play audio in javascript 
Javascript :: base64 to image nodejs 
Javascript :: javascript slice vs splice 
Javascript :: text.toUpperCase is not a function 
Javascript :: how to make an array in javascript 
Javascript :: new Date() get speicifc hours min sec 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =