채택완료
javascript 코드인데, t 정체가 뭔지?
<script>
window.addEventListener("message",
t=>{
switch(t.data){
case "scrollTop":$("html, body").animate({scrollTop:$("#iframe").offset().top-100},500)
}
}
);
</script>
위 코드에서 t 는 뭘 의미할까요? 그리고 화살표는 또 뭔지? ㅎ
답변 1개 / 댓글 4개
채택된 답변
+20 포인트
Arrow function 표현이고 t 는 인자입니다.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
답변에 대한 댓글 4개
답변을 작성하려면 로그인이 필요합니다.