repl.it
Nodejs

No description

fork
loading
Files
  • index.js
index.js
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
//function Movie(title, director, date){
 // this.title = title,
  //this.director = director,
  //this.date = date

  //}


//Movie.prototype.review = function(){ return `${this.title} is the best movie made, also directed by ${this.director}. It released in ${this.date}.`
//}

//let opinion = new Movie('Inception', 'Christopher' + ' Nolan', 2010);

//opinion.review()


//let nums = [21, 27, 30]

//var reducer = function(accumulator, item){
 // return accumulator + item;
//};

//let initialValue = 0;

//let total = nums.reduce(reducer, initialValue);

//console.log("Sum is", total)


?