addEnd Point js
const addEndPoint = (string) => {
const str = string.trim();
if (str.substr(-1) == ".") return str;
return `${str}.`;
};
Are there any code examples left?
New code examples in category Javascript
const addEndPoint = (string) => {
const str = string.trim();
if (str.substr(-1) == ".") return str;
return `${str}.`;
};