Go back to 1Z0-858 - Java Enterprise Edition 5 Web Component Developer Certified Professional Exam

Question :-

You need to create a JSP that generates some JavaScript code to populate an array of strings used on the client-side. Which JSP code snippet will create this array?
MY_ARRAY = new Array(); <% for ( int i = 0; i < serverArray.length; i++ ) { MY_ARRAY[<%= i %>] = '<%= serverArray[i] %>'; } %>
MY_ARRAY = new Array(); <% for ( int i = 0; i < serverArray.length; i++ ) { MY_ARRAY[${i}] = '${serverArray[i]}'; } %>
MY_ARRAY = new Array(); <% for ( int i = 0; i < serverArray.length; i++ ) { %> MY_ARRAY[<%= i %>] = '<%= serverArray[i] %>'; <% } %>
MY_ARRAY = new Array(); <% for ( int i = 0; i < serverArray.length; i++ ) { %> MY_ARRAY[${i}] = '${serverArray[i]}'; <% } %>

Want to practice for 1Z0-858 - Java Enterprise Edition 5 Web Component Developer Certified Professional Exam ? Click here.