File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const arr1 = [
4+ 'Marcus Aurelius' ,
5+ 'Commodus Antoninus' ,
6+ 'Victor Glushkov' ,
7+ ] ;
8+
9+ const arr2 = [
10+ 'Ibn Arabi' ,
11+ 'Mao Zedong' ,
12+ 'Rene Descartes' ,
13+ ] ;
14+
15+ const arrConcat1 = arr1 . concat ( arr2 ) ;
16+ const arrConcat2 = [ ...arr1 , ...arr2 ] ;
17+
18+ console . dir ( { arrConcat1, arrConcat2 } ) ;
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const obj1 = {
4+ 'Marcus Aurelius' : '212-04-26' ,
5+ 'Commodus Antoninus' : '312-04-26' ,
6+ 'Victor Glushkov' : '1923-08-24' ,
7+ } ;
8+
9+ const obj2 = {
10+ 'Ibn Arabi' : '1165-11-16' ,
11+ 'Mao Zedong' : '1893-12-26' ,
12+ 'Rene Descartes' : '1596-03-31' ,
13+ } ;
14+
15+ const objConcat1 = Object . assign ( { } , obj1 , obj2 ) ;
16+ const objConcat2 = { ...obj1 , ...obj2 } ;
17+
18+ console . dir ( { objConcat1, objConcat2 } ) ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments