标签: javascript variables coordinates dynamically-generated
//例如:
coordinates_x = 1; coordinates_y = 1; x = eval ( "block_" +coordinates_x + "_" + coordinates_y ); var x = 0;
coordinates_x = 1;
coordinates_y = 1;
x = eval ( "block_" +coordinates_x + "_" + coordinates_y );
var x = 0;
//所以有一个名为 block_1_1 的变量,其值为 0
block_1_1
0