Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function miFuncion1(p1, p2) {
- return p1 + p2;
- }
- //console.log(miFuncion1(2,2));
- var suma = function(p1, p2) {
- return p1 + p2;
- }
- //console.log(suma(3,3));
- var suma2 = (p1, p2) => {
- return p1 + p2;
- }
- //console.log(suma2(1,1));
- (function suma3(p1, p2) {
- return p1 + p2;
- })(5,5)
- /*
- console.log((function suma3(p1, p2) {
- return p1 + p2;
- })(5,5))
- */
- var obj = {
- suma4: function(p1, p2) {
- return p1 + p2;
- }
- };
- //console.log(obj.suma4(10,10));
- var suma5 = new Function("p1", "p2", "return p1 + p2");
- console.log(suma5(15,15));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement