Skip to content

Instantly share code, notes, and snippets.

View mpatel3's full-sized avatar
💭
Whatever it takes...

Manthan Patel mpatel3

💭
Whatever it takes...
  • MangoApps Pvt. Ltd.
  • Pune,India
View GitHub Profile
@mpatel3
mpatel3 / test.md
Last active January 31, 2022 16:48

Debouncing implementation

// as long as it continues to be invoked, it will not be triggered

function debounce (func, interval) {
  var timeout;
  return function () {
    var context = this, args = arguments;
    var later = function () {
      timeout = null;
      func.apply(context, args);
@mpatel3
mpatel3 / master-javascript-interview.md
Created November 17, 2019 11:28 — forked from Geoff-Ford/master-javascript-interview.md
Eric Elliott's Master the JavaScript Interview Series
@mpatel3
mpatel3 / jQuery.md
Last active January 28, 2025 13:29
jQuery coding Standards and Practices

##jQuery Best Coding Practices and Standards

  • Always try to use a CDN to include jQuery on your page. CDN Benefits
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/jquery-2.1.4.min.js" type="text/javascript"><\/script>')</script>
    
    <!-- Second line is for backup of the first one -->
    
    
@mpatel3
mpatel3 / Performance-String Reverse
Last active August 18, 2016 04:54
Different Reverse Method and Their performance Comparison.
# To check the performance of the StringReverse function using the native Browser console API.
/* Reverse Function-1 --------------------- */
```js
var reverse = function(str) {
return str.split('').reverse().join('');
};
```
/* ----------- Reverse Function-2 ------------ */