-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrow.js
More file actions
48 lines (34 loc) · 1.07 KB
/
arrow.js
File metadata and controls
48 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// const sayHello = function(name){
// return "Hey hi!, " + name + " Howdy?"
// }
// console.log(sayHello('vishal'))
// const sayHello = (name) => `hey hi!, ${name} Howdy?`
// console.log(sayHello('vishal'))
// const todos = [
// {title: 'buy bread',isDone: true},
// {title: 'Go to Gym', isDone: true},
// {title: 'Record youtube videos', isDone: false}
// ]
// const thingsDone = todos.filter((element) => element.isDone === true)
// console.log(thingsDone)
// const thingsDone = todos.filter((element) => element.isDone === true).map(returnedValue => returnedValue.title)
// console.log(thingsDone.title)
// const camera = {
// price: 600,
// brand: 'sony',
// descrip: function(){
// return `My camera brand ${this.brand} price ${this.price}$`
// }
// }
// console.log(camera.descrip());
//JS consider this as false
//false
// 0
// "" empty string
// null
// undefined
// Note {} & [] are true
//also note - is minus but + is concatenation
// console.log('5'-5); >> 0
// console.log('5'+5); >> 55
// use typeof function to confirm the type