-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd6.js
866 lines (666 loc) · 21.6 KB
/
d6.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
const movies = [
{
Title: "The Lord of the Rings: The Fellowship of the Ring",
Year: "2001",
imdbID: "tt0120737",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BN2EyZjM3NzUtNWUzMi00MTgxLWI0NTctMzY4M2VlOTdjZWRiXkEyXkFqcGdeQXVyNDUzOTQ5MjY@._V1_SX300.jpg",
},
{
Title: "The Lord of the Rings: The Return of the King",
Year: "2003",
imdbID: "tt0167260",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNzA5ZDNlZWMtM2NhNS00NDJjLTk4NDItYTRmY2EwMWZlMTY3XkEyXkFqcGdeQXVyNzkwMjQ5NzM@._V1_SX300.jpg",
},
{
Title: "The Lord of the Rings: The Two Towers",
Year: "2002",
imdbID: "tt0167261",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNGE5MzIyNTAtNWFlMC00NDA2LWJiMjItMjc4Yjg1OWM5NzhhXkEyXkFqcGdeQXVyNzkwMjQ5NzM@._V1_SX300.jpg",
},
{
Title: "Lord of War",
Year: "2005",
imdbID: "tt0399295",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTYzZWE3MDAtZjZkMi00MzhlLTlhZDUtNmI2Zjg3OWVlZWI0XkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg",
},
{
Title: "Lords of Dogtown",
Year: "2005",
imdbID: "tt0355702",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNDBhNGJlOTAtM2ExNi00NmEzLWFmZTQtYTZhYTRlNjJjODhmXkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg",
},
{
Title: "The Lord of the Rings",
Year: "1978",
imdbID: "tt0077869",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BOGMyNWJhZmYtNGQxYi00Y2ZjLWJmNjktNTgzZWJjOTg4YjM3L2ltYWdlXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_SX300.jpg",
},
{
Title: "Lord of the Flies",
Year: "1990",
imdbID: "tt0100054",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BOTI2NTQyODk0M15BMl5BanBnXkFtZTcwNTQ3NDk0NA@@._V1_SX300.jpg",
},
{
Title: "The Lords of Salem",
Year: "2012",
imdbID: "tt1731697",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMjA2NTc5Njc4MV5BMl5BanBnXkFtZTcwNTYzMTcwOQ@@._V1_SX300.jpg",
},
{
Title: "Greystoke: The Legend of Tarzan, Lord of the Apes",
Year: "1984",
imdbID: "tt0087365",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTM5MzcwOTg4MF5BMl5BanBnXkFtZTgwOTQwMzQxMDE@._V1_SX300.jpg",
},
{
Title: "Lord of the Flies",
Year: "1963",
imdbID: "tt0057261",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BOGEwYTlhMTgtODBlNC00ZjgzLTk1ZmEtNmNkMTEwYTZiM2Y0XkEyXkFqcGdeQXVyMzU4Nzk4MDI@._V1_SX300.jpg",
},
{
Title: "The Avengers",
Year: "2012",
imdbID: "tt0848228",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNDYxNjQyMjAtNTdiOS00NGYwLWFmNTAtNThmYjU5ZGI2YTI1XkEyXkFqcGdeQXVyMTMxODk2OTU@._V1_SX300.jpg",
},
{
Title: "Avengers: Infinity War",
Year: "2018",
imdbID: "tt4154756",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMjMxNjY2MDU1OV5BMl5BanBnXkFtZTgwNzY1MTUwNTM@._V1_SX300.jpg",
},
{
Title: "Avengers: Age of Ultron",
Year: "2015",
imdbID: "tt2395427",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTM4OGJmNWMtOTM4Ni00NTE3LTg3MDItZmQxYjc4N2JhNmUxXkEyXkFqcGdeQXVyNTgzMDMzMTg@._V1_SX300.jpg",
},
{
Title: "Avengers: Endgame",
Year: "2019",
imdbID: "tt4154796",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTc5MDE2ODcwNV5BMl5BanBnXkFtZTgwMzI2NzQ2NzM@._V1_SX300.jpg",
},
];
/*
ASSIGNMENT RULES
- All the answers must be written in JavaScript
- You can ask for help, reach the Teaching Assistants if needed
- You can Google / use StackOverflow BUT only when you think you need something we didn't cover during lessons yet
- You can test your code in a separate file or de-commenting the single exercises in this one.
- You can use the bash terminal, the VSCode terminal or the one embedded in your Operating System if you're using macOS or Linux.
- The solution must be pushed to the repository and be available for the tutors by the end of the day (5PM CET)
- Complete as many exercises as you can
*/
// JS Basics
console.log("\n ^^^^^^^^^^^BASICS^^^^^^^^^^^\n")
/* EXERCISE A
Create a variable called test and assign a string value to it.
*/
let test = "Strive school"
/* EXERCISE B
Create a variable called sum and assign to it the result of the sum between the numbers 10 and 20.
*/
let sum = 10 + 20
/* EXERCISE C
Create a variable called random and assign to it a random number between 0 and 20 (it should be randomly created at each execution).
*/
let random = Math.floor((Math.random() * 20) )
console.log(random)
/* EXERCISE D
Create a variable called me and assign to it an object containing the following information: name = your name, surname = your surname, age = your age.
*/
let me = {
name: "Martin",
surName: "Konecny",
age: 124
}
console.log(me)
/* EXERCISE E
Write a piece of code for programmatically removing the age property from the previously create object.
*/
delete me.age
console.log(me)
/* EXERCISE F
Write a piece of code for programmatically adding to the me object you defined before an array called skills, containing the programming languages you know right now.
*/
me.skills = ["programming language 1", "programming language 2", "programming language 3" , "programming language 4"]
console.log(me)
/* EXERCISE G
Write a piece of code for programmatically removing the last skill from the skills array inside the me object.
*/
let lastSkillRemoved = me.skills.pop()
console.log(me)
console.log(lastSkillRemoved)
console.log("\n -------------EXERCISE 1 ------------- \n")
// JS Functions
/* EXERCISE 1
Write a function called dice; it should randomize an integer number between 1 and 6.
*/
// RANDOM FUNCTION: https://www.w3schools.com/js/js_random.asp
const dice = function() {
return Math.floor(Math.random() * 6) + 1;
}
console.log(dice())
console.log("\n -------------EXERCISE 2 ------------- \n")
/* EXERCISE 2
Write a function called whoIsBigger which receives 2 numbers as parameters and returns the biggest one.
*/
const whoIsBigger = function(number1, number2) {
if (number1 === number2) {
return "Both numbers are equal"
} else if (number1 < number2) {
return number2
} else {
return number1
}
}
console.log(whoIsBigger(2,2))
console.log(whoIsBigger(1,100))
console.log(whoIsBigger(0,-12))
console.log("\n -------------EXERCISE 3 ------------- \n")
/* EXERCISE 3
Write a function called splitMe which receives a string as a parameter and returns an array with every word in that string.
Ex.: splitMe("I love coding") => returns ["I", "Love", "Coding"]
*/
const splitMe = function (text) {
return text.split(" ")
}
console.log(splitMe("I love coding"))
console.log("\n -------------EXERCISE 4 ------------- \n")
/* EXERCISE 4
Write a function called deleteOne which receives a string and a boolean as parameters.
If the boolean value is true it should return the string without the first letter, otherwise it should remove the last one from it.
*/
const deleteOne = function (text2, tf) {
if (tf) {
return text2.slice(1)
} else {
return text2.slice(0, (text2.length - 1))
}
}
console.log(deleteOne("AExample textB", true))
console.log(deleteOne("AExample textB", false))
console.log("\n -------------EXERCISE 5 ------------- \n")
/* EXERCISE 5
Write a function called onlyLetters which receives a string as a parameter and returns it removing all the digits.
Ex.: onlyLetters("I have 4 dogs") => returns "I have dogs"
*/
// Regular expressions - watch tutorial: https://www.youtube.com/watch?v=VrT3TRDDE4M&ab_channel=DevTips
const onlyLetters = function (text) {
return text.replace(/[0-9]/g, "")
}
console.log(onlyLetters("I have 4 dogs and 5 cats"))
console.log("\n -------------EXERCISE 6 ------------- \n")
/* EXERCISE 6
Write a function called isThisAnEmail which receives a string as a parameter and returns true if the string is a valid email address.
*/
/*
let email1 = "tsdgdsgcom"
let email2 = "[email protected]"
let email3 = "[email protected]"
let subStr = email1.slice(email1.indexOf("@"))
console.log(email1.search("@"))
console.log(subStr)
console.log(subStr.search(".")) */
const isThisAnEmail = function (email) {
if (email.search("@") === -1) {
return "Not a valid email"
} else {
return "Email OK"
}
}
console.log(isThisAnEmail("dssgsgdsgsd.sd"))
console.log(isThisAnEmail("[email protected]"))
/* if (email1.search("@") === -1) {
console.log("Email not valid")
} else if (email1.slice(search("@")).search(".") === -1) {
console.log("Email not valid")
} else {
console.log("Email OK")
} */
console.log("\n -------------EXERCISE 7 ------------- \n")
/* EXERCISE 7
Write a function called whatDayIsIt that should return the current day of the week.
*/
const whatDayIsIt = function () {
const d = new Date();
let dayIndex = d.getDay()
let day
switch (dayIndex) {
case 0: day = "It's sunday"; break
case 1: day = "It's monday"; break
case 2: day = "It's tuesday"; break
case 3: day = "It's wednesday"; break
case 4: day = "It's thursday"; break
case 5: day = "It's friday"; break
case 6: day = "It's saturday"; break
}
return day
}
console.log(whatDayIsIt())
console.log("\n -------------EXERCISE 8 ------------- \n")
/* EXERCISE 8
Write a function called rollTheDices which receives a number as a parameter.
It should invoke the dice() function defined in Ex1 the specified amount of times,
and return an object containing a sum property holding the sum of all values extracted
and a values array containing the single values of the dicerolls themselves.
Example: RollTheDices(3) => returns {
sum: 10
values: [3, 3, 4]
}
*/
const rollTheDices = function (n) {
let array = []
let add = 0
let obj = {}
for (i=0; i<n; i++) {
array.push(dice())
}
for (i=0; i<array.length; i++) {
add += array[i]
}
obj.sum = add
obj.values = array
return obj
}
console.log(rollTheDices(10))
console.log("\n -------------EXERCISE 9 ------------- \n")
/* EXERCISE 9
Write a function called howManyDays which receives a date as a parameter and returns the number of days passed since that date.
*/
const howManyDays = function(dateInput) {
let d0 = new Date(dateInput)
let d = new Date()
let diff = Math.floor((d - d0) / 86400000)
return diff
}
console.log(howManyDays("12. 6. 2020"))
console.log("\n -------------EXERCISE 10 ------------- \n")
/* EXERCISE 10
Write a function called isTodayMyBirthday which should return true if today's your birthday, false otherwise.
*/
const isTodayMyBirthday = function () {
let myBirthday = "10. 29. 1987"
let myBirthdayTransformed = new Date(myBirthday)
let myBirthdayDate = myBirthdayTransformed.getDate()
let myBirthdayMonth = myBirthdayTransformed.getMonth()
let today = new Date()
let todayDate = today.getDate()
let todayMonth = today.getMonth()
if (myBirthdayDate === todayDate && myBirthdayMonth === todayMonth) {
return "Today is your birthday"
} else {
return "Today is not your birthday"
}
}
console.log(isTodayMyBirthday())
console.log("\n -------------EXERCISE 11 ------------- \n")
// JS Arrays & Objects
// NOTE: the movies array used in some exercises is defined at the end of this file
/* EXERCISE 11
Write a function called deleteProp which receives an object and a string as parameters,
and returns the given object after deleting its property named as the given string.
*/
/* const deleteProp = function (obj, str) {
} */
/* const getKeys = function(obj){
let keys = [];
for(let key in obj){
keys.push(key);
}
return keys;
} */
const deleteProp = function (obj, str) {
delete obj[str]
return obj
}
let student = {
firstName: "Gordon",
lastName: "Freeman",
age: 38,
batch: "WEB-Nov21",
hasWebcam: true,
}
let str = "age"
console.log(student)
console.log(deleteProp(student, str))
console.log("\n -------------EXERCISE 12 ------------- \n")
/* EXERCISE 12
Write a function called oldestMovie which finds the oldest movie in the provided movies array.
*/
/* console.log(movies[0].Year)
console.log(movies.length)
let min = movies[0].Year
for (i=0; i < movies.length; i++) {
if (movies[i].Year < min ) {
min = movies[i].Year
}
}
console.log(min) */
const oldestMovie = function () {
let min = movies[0].Year
for (i=0; i < movies.length; i++) {
if (movies[i].Year < min ) {
min = movies[i].Year
}
}
return min
/* let filterObj = movies.filter(function(e) {
return e.year === min
} */
}
console.log(oldestMovie())
console.log("\n -------------EXERCISE 13 ------------- \n")
/* EXERCISE 13
Write a function called countMovies which returns the number of movies contained in the provided movies array.
*/
const countMovies = function () {
return `Number of movies is ${movies.length}`
}
console.log(countMovies())
console.log("\n -------------EXERCISE 14 ------------- \n")
/* EXERCISE 14
Write a function called onlyTheTitles which creates an array with just the titles of the movies contained in the provided movies array.
*/
const onlyTheTitles = function(){
let array = []
for (i=0; i < movies.length; i++) {
array.push(movies[i].Title)
}
return array
}
console.log(onlyTheTitles())
console.log("\n -------------EXERCISE 15 ------------- \n")
/* EXERCISE 15
Write a function called onlyInThisMillennium which returns only the movies produced in this millennium from the provided movies array.
*/
const onlyInThisMillennium = function(){
let array = []
for (let i = 0; i < movies.length; i++) {
if (movies[i].Year >= 2000) {
array.push(movies[i])
}
}
return array
}
console.log(onlyInThisMillennium())
console.log("\n -------------EXERCISE 16 ------------- \n")
/* EXERCISE 16
Write a function called getMovieById which receives an id as a parameter and returns the movie with the given id from the provided movies array.
*/
const getMovieById = function(id) {
let newList = [];
for (let i = 0; i < movies.length; i++) {
if (movies[i].imdbID === id) {
newList.push(movies[i]);
}
}
return newList
}
console.log(getMovieById('tt4154756'));
console.log("\n -------------EXERCISE 17 ------------- \n")
/* EXERCISE 17
Write a function called sumAllTheYears which returns the sum of all the years in which the movies in the provided movies array have been produced.
*/
const sumAllTheYears = function () {
let yearsOnly = []
for (i = 0; i < movies.length; i++) {
yearsOnly.push(movies[i].Year)
}
let sumOfYears = 0
for (j = 0; j < yearsOnly.length; j++) {
sumOfYears += parseInt(yearsOnly[j])
}
return sumOfYears
}
console.log(sumAllTheYears())
console.log("\n -------------EXERCISE 18 ------------- \n")
/* EXERCISE 18
Write a function called searchByTitle which receives a string as a parameter and returns all the movies in the provided movies array which contain that string in the title.
*/
const searchByTitle = function (searchWord) {
let filteredMovies = []
for (i = 0; i < movies.length; i++) {
if (movies[i].Title.search(searchWord) > 0) {
filteredMovies.push(movies[i])
}
}
return filteredMovies
}
console.log(searchByTitle("Ring"))
console.log("\n -------------EXERCISE 19 ------------- \n")
/* EXERCISE 19
Write a function called searchAndDivide which receives a string as a parameter and returns an object;
this object should contain an array called match, made by all the movies from the provided movies array which contain the given string in the title,
and another array unmatch with all the remaining ones.
*/
const searchAndDivide = function (searchWord) {
let matched = []
let unmatched = []
let obj = {}
for (i = 0; i < movies.length; i++) {
if (movies[i].Title.search(searchWord) >= 0) {
matched.push(movies[i])
} else if (movies[i].Title.search(searchWord) < 0) {
unmatched.push(movies[i])
}
}
obj.matched = matched
obj.unmatched = unmatched
return obj
}
console.log(searchAndDivide("Lord"))
console.log("\n -------------EXERCISE 20 ------------- \n")
/* EXERCISE 20
Write a function called "removeIndex" which receives a number as a parameter and returns the provided movies array without the element in the given position.
*/
const removeIndex = function (index) {
movies.splice(index,1)
return movies
}
console.log(removeIndex(2))
console.log("\n -------------EXERCISE 21 ------------- \n")
// [EXTRAS] JS Advanced
/* EXERCISE 21
Create a function called "halfTree" which receives a number as a parameter and builds an "*" half tree with the given height.
Example:
halfTree(3)
*
**
***
*/
const halfTree = function (n) {
let star = "*"
for (i = 0; i < n; i++) {
console.log(star)
star = star + "*"
}
}
halfTree(3)
console.log("\n -------------EXERCISE 22 ------------- \n")
/* EXERCISE 22
Create a function called "tree" which receives a number as a parameter and builds an "*" tree with the given height.
Example:
tree(3)
*
***
*****
*/
const tree = function (h) {
for(let i=0; i<=h; i++){
let star = '';
//Changed to start high then decrease
for(let k = 1; k <= h - i; k++){
//shortened to one space
star += " ";
};
for(let j=0; j<=i; j++) {
//Added space so there is an odd number
//of symbols and the star above fits
//the space
star += " *";
};
//Moved into the loop
console.log(star);
};
};
tree(15);
console.log("\n -------------EXERCISE 23 ------------- \n")
/* EXERCISE 23
Create a function called "isItPrime" that receives a number as a parameter and returns true if the given number is a prime number.
*/
const isItPrime = function (num) {
for(let i = 2; i < num; i++)
if(num % i === 0) return false;
return num > 1;
}
console.log(isItPrime(81))
/* WHEN YOU ARE FINISHED
Commit and push the code to your personal GitHub repository; then post the link of your commit on the Homework section of today's Eduflow.
*/
/* This movies array is used throughout the exercises. You're not supposed to alter it. */
/* const movies = [
{
Title: "The Lord of the Rings: The Fellowship of the Ring",
Year: "2001",
imdbID: "tt0120737",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BN2EyZjM3NzUtNWUzMi00MTgxLWI0NTctMzY4M2VlOTdjZWRiXkEyXkFqcGdeQXVyNDUzOTQ5MjY@._V1_SX300.jpg",
},
{
Title: "The Lord of the Rings: The Return of the King",
Year: "2003",
imdbID: "tt0167260",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNzA5ZDNlZWMtM2NhNS00NDJjLTk4NDItYTRmY2EwMWZlMTY3XkEyXkFqcGdeQXVyNzkwMjQ5NzM@._V1_SX300.jpg",
},
{
Title: "The Lord of the Rings: The Two Towers",
Year: "2002",
imdbID: "tt0167261",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNGE5MzIyNTAtNWFlMC00NDA2LWJiMjItMjc4Yjg1OWM5NzhhXkEyXkFqcGdeQXVyNzkwMjQ5NzM@._V1_SX300.jpg",
},
{
Title: "Lord of War",
Year: "2005",
imdbID: "tt0399295",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTYzZWE3MDAtZjZkMi00MzhlLTlhZDUtNmI2Zjg3OWVlZWI0XkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg",
},
{
Title: "Lords of Dogtown",
Year: "2005",
imdbID: "tt0355702",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNDBhNGJlOTAtM2ExNi00NmEzLWFmZTQtYTZhYTRlNjJjODhmXkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg",
},
{
Title: "The Lord of the Rings",
Year: "1978",
imdbID: "tt0077869",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BOGMyNWJhZmYtNGQxYi00Y2ZjLWJmNjktNTgzZWJjOTg4YjM3L2ltYWdlXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_SX300.jpg",
},
{
Title: "Lord of the Flies",
Year: "1990",
imdbID: "tt0100054",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BOTI2NTQyODk0M15BMl5BanBnXkFtZTcwNTQ3NDk0NA@@._V1_SX300.jpg",
},
{
Title: "The Lords of Salem",
Year: "2012",
imdbID: "tt1731697",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMjA2NTc5Njc4MV5BMl5BanBnXkFtZTcwNTYzMTcwOQ@@._V1_SX300.jpg",
},
{
Title: "Greystoke: The Legend of Tarzan, Lord of the Apes",
Year: "1984",
imdbID: "tt0087365",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTM5MzcwOTg4MF5BMl5BanBnXkFtZTgwOTQwMzQxMDE@._V1_SX300.jpg",
},
{
Title: "Lord of the Flies",
Year: "1963",
imdbID: "tt0057261",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BOGEwYTlhMTgtODBlNC00ZjgzLTk1ZmEtNmNkMTEwYTZiM2Y0XkEyXkFqcGdeQXVyMzU4Nzk4MDI@._V1_SX300.jpg",
},
{
Title: "The Avengers",
Year: "2012",
imdbID: "tt0848228",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BNDYxNjQyMjAtNTdiOS00NGYwLWFmNTAtNThmYjU5ZGI2YTI1XkEyXkFqcGdeQXVyMTMxODk2OTU@._V1_SX300.jpg",
},
{
Title: "Avengers: Infinity War",
Year: "2018",
imdbID: "tt4154756",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMjMxNjY2MDU1OV5BMl5BanBnXkFtZTgwNzY1MTUwNTM@._V1_SX300.jpg",
},
{
Title: "Avengers: Age of Ultron",
Year: "2015",
imdbID: "tt2395427",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTM4OGJmNWMtOTM4Ni00NTE3LTg3MDItZmQxYjc4N2JhNmUxXkEyXkFqcGdeQXVyNTgzMDMzMTg@._V1_SX300.jpg",
},
{
Title: "Avengers: Endgame",
Year: "2019",
imdbID: "tt4154796",
Type: "movie",
Poster:
"https://m.media-amazon.com/images/M/MV5BMTc5MDE2ODcwNV5BMl5BanBnXkFtZTgwMzI2NzQ2NzM@._V1_SX300.jpg",
},
]; */