Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get format file in javascript

var myString = "this.is.my.file.txt"
alert(myString.substring(myString.lastIndexOf(".") + 1));

// Result
txt
Comment

PREVIOUS NEXT
Code Example
Javascript :: js ternary 
Javascript :: change image onclick html 
Javascript :: json array 
Javascript :: ajax upload image 
Javascript :: get params from route vuejs 
Javascript :: node server 
Javascript :: check online status javascript 
Javascript :: fixed menu reactjs 
Javascript :: datatables on row created 
Javascript :: compare two dates in javascript yyyy-mm-dd 
Javascript :: getting average of array javascript 
Javascript :: extract all link with javascript 
Javascript :: how to sort array without using sort method in javascript 
Javascript :: cypress check attribute for each element 
Javascript :: node js cross origin error 
Javascript :: nodejs sha512 decrypt 
Javascript :: fetch catch 
Javascript :: Remove Duplicates array values in javascript 
Javascript :: express middleware 
Javascript :: download file from api vue 
Javascript :: react-native eject not working 
Javascript :: how to change package name in ios react native 
Javascript :: how to get number of a specific element of an array 
Javascript :: dynamic route vue 
Javascript :: Javascript console log a string 
Javascript :: javascript reset span html 
Javascript :: conditional classname prop react 
Javascript :: Navigator.pushReplacementNamed parameters 
Javascript :: ternary operator react 
Javascript :: reactjs radio button onchange 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =