Datos de bucle de la base de datos Laravel a JavaScript

this is how to loop data to javascript variable
var locations = [
    @foreach ($data as $i)
         [ "{{ $i->name }}  " + "{{ $i->contact_city }}" , {{ $i->lat }},{{ $i->lng }},0, 'https://test.webshooter.se/app/competitions/'+{{ $i->id }}+ '/information'],
         @endforeach         
];
Coding Till Die