Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

trim characters from end of string javascript code example

Example 1: remove last character from string js

var str = "Your string"
str = str.slice(0, -1); 
console.log(str)
//returns "Your strin"

Example 2: remove last character from string javascript

let str = "12345.00";
str = str.substring(0, str.length - 1);
console.log(str);

Tags:

Javascript Example

Related

install julia on ubuntu code example background-image no-repeat center center code example order a list based on numbers in it javascript code example script tags in jsx code example list all commands bash code example C# dictionary multiple keys code example bind this to methods in react code example css change input size code example python popular frameworks code example mysql alter table add column with default value code example how to make a mod for minecraft code example lumen artisan code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy