how to check whether string ends with .jpg code example
Example: endswith()
var str = "Hello world, welcome to the universe.";
var n = str.endsWith("universe.");//returns true
var str = "Hello world, welcome to the universe.";
var n = str.endsWith("universe.");//returns true