Skip to content

Commit

Permalink
Day 33: Git Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
uttu-316 committed Nov 14, 2022
1 parent de51f92 commit 9e65b47
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions javascript/Day33/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Regular function vs Arrow Function
//Es5 & Es6
//Syntax
//Argumnet Binding
//New keyword
//This Keyword

function abc(a, b) {
return a + b;
}

const abc = (a, b) => a + b;

function xyz(x, y) {
console.log(arguments);
}

xyz(1, 2, 3, 4, 5, 5, 6);

const xyz = (a, b) => {
console.log(arguments); // it will give us error.
};

xyz(1, 2, 3, 4, 5, 5, 6);

function Person() {
return "I am a Person";
}

const obj = new Person();

const Person = () => {
return "I am a Person";
};
const obj = new Person(); // error.

const car = {
name: "Creta",
getName: function () {
console.log(this);
},
};
car.getName();

const car = {
name: "Creta",
getName: () => {
console.log(this);
},
};

0 comments on commit 9e65b47

Please sign in to comment.