Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function myfunc() {
- console.log('this is myfunc');
- }
- oldmyfunc = myfunc;
- myfunc = function() {
- console.log('code to run before myfunc');
- oldmyfunc();
- }
- myfunc();
- // code to run before myfunc
- // this is myfunc
Add Comment
Please, Sign In to add comment