- let targetTop = this.targetElem.getBoundingClientRect().top;
- let scrollElem = document.documentElement.scrollTop ? document.documentElement : document.body;
- let duration = 300;
- let start = Date.now();
- let scrollStart = this.targetElem.getBoundingClientRect().top;
+ const targetTop = this.targetElem.getBoundingClientRect().top;
+ const scrollElem = document.documentElement.scrollTop ? document.documentElement : document.body;
+ const duration = 300;
+ const start = Date.now();
+ const scrollStart = this.targetElem.getBoundingClientRect().top;