How to use js code control div scroll

#1

html : <div class=“fixed” id=“myScroll” style=“padding-right: 10px;”>

<a style=“margin-left: 13px;” *ngFor=“let title of navTitles let j=index” (click)=“clickNavBtn(j)”>

<img src=“assets/assets/arrow-left-select.png” style=“width:18px;height:18px;position: relative;top:2px;” *ngIf=“j!=0&&j!=navIndex”/>

<img src=“assets/assets/arrow-left-normal.png” style=“width:18px;height:18px;position: relative;top:2px;” *ngIf=“j!=0&&j==navIndex”/>

<a style=“font-size: 1.06rem;margin-top: 0px;” [ngStyle]="{‘color’:j==navIndex?’#999’:’#2bcab2’}">{{title}}</a>

</a>

</div>

js:var scroll = document.getElementById(‘myScroll’);
scroll.scrollTo(50,0);;

Not rolling ,why???