nerdexam
Microsoft

70-515 · Question #65

You create a Web page that contains the following div. <div id="target"> </div> You have a JavaScript array named imageurls that contains a list of image URLs. You need to write a JavaScript…

The correct answer is C. $.each(imageurls, function(i,url){. See the full explanation below for the reasoning.

Question

You create a Web page that contains the following div. <div id="target"> </div> You have a JavaScript array named imageurls that contains a list of image URLs. You need to write a JavaScript function that will insert images from the URLs into target. Which code segment should you use?

Options

  • A$(imageurls).each(function(i,url){
  • B$(imageurls).each(function(i,url){
  • C$.each(imageurls, function(i,url){
  • D$.each(imageurls, function(i,url){

How the community answered

(37 responses)
  • A
    11% (4)
  • B
    3% (1)
  • C
    81% (30)
  • D
    5% (2)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice