<prompt> Kuandika kipande cha code katika Javascript kwamba assigns thamani ya safu.  <response>: Heres an example of a code snippet in JavaScript that assigns values to an array:javascript Create the arrayvar fruits Apple, Banana, Orange; Assign value at index 1fruits1 Mango; Log the new arrayconsole.logfruits; Output: Apple, Mango, OrangeIn this code snippet, we create an array called fruits containing three string values. We then assign a new value, Mango, to the array at index 1, replacing the previous value Banana. Finally, we log the resulting array to the console to show that the value has been assigned. 