JS String methods
by anoopsuda
JavaScript
let text = "India is my country.png";
console.log(text);
let position = text.lastIndexOf(".");
console.log(position);
let ext = text.substring(15);
console.log(ext);
by anoopsuda
let text = "India is my country.png";
console.log(text);
let position = text.lastIndexOf(".");
console.log(position);
let ext = text.substring(15);
console.log(ext);