Hers code: return filename.split('.').pop(); return /[^.]+$/.exec(filename); return (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined;
Developers Map
Discy Latest Questions
if you want to get your browser name and version you can use below code it will helpful for you. it is a easy way to get browser name and version using Javascript. Code :
You’re asking for zero padding? Not really rounding. You’ll have to convert it to a string since numbers don’t make sense with leading zeros. Something like this… function pad(num, size) { var s = num+""; ...
How to Disable right-clicking by using JavaScript use javascript code given below: window.onload = function() { document.addEventListener("contextmenu", function(e){ e.preventDefault(); }, false); document.addEventListener("keydown", function(e) { ...
Please provide me the code with html part also.
When we are working on a website bit we want to print a web page or specific section or image then you should try this code.This blog will show you how to use JavaScript’s for print a web page. The ...
let prescription_detail = [{name:'test1'},{name:'test2'}] this.prescription_detail.forEach((val, key)=> { // Do something. });
There are different methods and techniques you can use to remove elements from JavaScript arrays: pop – Removes from the End of an Array var ar = [1, 2, 3, 4, 5, 6]; ar.pop(); // returns 6 console.log( ar ); // [1, 2, 3, ...