Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://jsfiddle.net/9n9y2soc/1/
- //https://jsfiddle.net/bz5yhgza/
- //pre esistent function
- function deleteCob(id){
- console.log("deleteCob - id:"+id)
- }
- //get the function
- var common_deleteCob = typeof deleteCob !== "undefined" ? deleteCob : function() {
- };
- //override it
- deleteCob = function(idCoob){
- myFunction();
- common_deleteCob(idCoob);
- }
- //our new function
- function myFunction(){
- console.log("myFunction");
- }
- ///then call it
- deleteCob(234);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement