Let's get to understand this piece of code line by line: The first 3 lines are easy to understand, line 2 and line 3 will store the width and height of the screen to the variable width and height. Line 4 will create a 256 elements array where each element in the array is "1". Line 6 to the second last line is the callback function of the setInterval() function in the last line. Line 7 and 8 will fill the screen with background color of black and an alpha factor of 0.05. When each time the draw function is called, this will draw the background on the screen. This is why we can see the text has different color at different places. Some text will have green color without transparent background color. This is because there will be a new layer drawn on the screen each time the draw is called Line 9 will change the fill color to green so that the the text drawn on the screen will be green. Line 10 call the Array.prototype.map() function, this will apply the callback function on each element of the letters array. The two parameters y_pos and index are the value and index of each element of the array respectively. The initial y_pos is 1 for all elements. Line 11 will generate a random character to be drawn next Line 12 will set the x position of each text to be drawn from left to right. Line 13 will draw the text at respective x and y position. Line 14 will set the next y position for each element. The y position will be randomly generated so that we can see each element in the array will show at different y positions. This will create the cool matrix effect. The last line will start to draw the matrix with a time interval of 33 milliseconds.