---
title: "Comment by Alex Sunny on \"JS Expression, Statement;\" | Hashnode"
description: "Hello, You can try it hope this will work. function changeThatArray(arr) { arr[0] = 100; } var sampleArray = [10,20,30] console.log(sampleArray[0]); // 10 chang"
url: "https://hashnode.com/posts/js-expression-statement/5f83f2df365d8e30601320fc/comment/5f884b36d7dc0b17a97a1134"
---

[Discussion](https://hashnode.com/posts/js-expression-statement/5f83f2df365d8e30601320fc)

Comment [JS Expression, Statement;](https://hashnode.com/posts/js-expression-statement/5f83f2df365d8e30601320fc)

[Alex Sunny](https://hashnode.com/@alexsunny123)

[Oct 15, 2020](https://hashnode.com/posts/js-expression-statement/5f83f2df365d8e30601320fc/comment/5f884b36d7dc0b17a97a1134)

Hello,

You can try it hope this will work.

function changeThatArray(arr) { arr\[0\] = 100; }

var sampleArray = \[10,20,30\]

console.log(sampleArray\[0\]); // 10

changeThatArray(sampleArray); [ometv.onl](https://ometv.onl/) [chatroulette.top](https://chatroulette.top/) [omegle.wtf](https://omegle.wtf/) [bazoocam.cam](https://bazoocam.cam/) console.log(sampleArray\[0\]); // 100

thanks alexsunny
