diff --git a/yourPlayground.js b/yourPlayground.js index e69de29..69ca682 100644 --- a/yourPlayground.js +++ b/yourPlayground.js @@ -0,0 +1,59 @@ +console.log('hello') + +const identity =(name ,surname) =>{ + +const person= { + name:name, + surname:surname, + asset:10000, + liability:2000, + NetWorth: function () { + return this.asset-this.liability + } +} + // const prs = `the name is ${person.name} and surname is ${person.surname} and the networth is ${person.asset-person.liability}` + + // const prs = `the name is ${person.name} and surname is ${person.surname} and the networth is ${person.NetWorth}` //this will treat function as value to avoid this + const prs = `the name is ${person.name} and surname is ${person.surname} and the networth is ${person.NetWorth()}` + return prs + +} + + console.log(identity('zahir','khan')) + + console.log('not working') + + fruits = ['🍌', '🍎', '🍊', '🍐'] + // console.log(fruits) + + // for(let i=0; i{ + let result=[] + for(const index of numbers){ + result.push(index*2) + } + return result + } + + console.log(double1([1,2,3,4,5])) \ No newline at end of file