title: Take a random number inside an array and every time the browser reload it changes
body: <p>I did this project in Angular that uses the TMDB API, the project is almost finished, but I wanted to make a change that every time the browser was reloaded, the background image (backdrop_path) and the other items changed.
  At the moment this information is manual coming from the TMDB API.
  Grateful</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Service *****
  
   getComedy(): Observable&lt;Movies&gt; {
      return this.http.get&lt;Movies&gt;(`${this.url}${endpoint.comedy}`, { params } )
    }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Component HEADER ****
  
  &lt;div class="header__banner" [ngStyle]="{'background' : 'url(' + headerBGUrl + ')'}"&gt;
        &lt;div class="featured--horizontal"&gt;
          &lt;div class="featured--vertical"&gt;&lt;/div&gt;
        &lt;/div&gt;
          &lt;div class="info"&gt;
            &lt;div class="title"&gt;
              &lt;h2&gt;{{ comedy.results[5].title }}&lt;/h2&gt; 
              &lt;span class="points"&gt;Nota: &lt;/span&gt;
              &lt;span class="points"&gt;{{ comedy.results[5].popularity | number:'1.1-1'}}&lt;/span&gt; 
              &lt;span&gt;{{ comedy.results[5].release_date | date:'yyyy' }}&lt;/span&gt;
            &lt;/div&gt;
            &lt;p&gt;{{ comedy.results[5].overview }}&lt;/p&gt;
            &lt;div class="info-btns"&gt;
              &lt;button class="watchButton"&gt;► Assistir&lt;/button&gt;
              &lt;button class="listButton"&gt;+ Minha Lista&lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      
      ****
  Component Header Typescript *****
  
  
    subs: Subscription[] = []
    sticky!: boolean;
  
    comedy!: Movies;
  
    @ViewChild('stickHeader') header!: ElementRef;
    headerBGUrl!: any;
    
    constructor(public movies: ServiceApiService) { }
  
    ngOnInit(): void {
      this.subs.push(this.movies.getComedy().subscribe(data =&gt; {
        this.comedy = data;
        this.headerBGUrl = 'https://image.tmdb.org/t/p/original' + this.comedy.results[5].backdrop_path;
      }));
    }</code></pre>
  </div>
  </div>
  </p>