Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. var tabAgents = {
  2. "001": ["Edward Donne", "Referred to in the Raymond Benson novel, Doubleshot, Edward Donne is the only agent 001."],
  3. "004": ["Frederick Wardner", "A 004 appears in the Benson novel The Facts of Death. In the Sebastian Faulks novel Devil May Care, Bond girl Scarlett Papava is unveiled as 004, replacing the previous agent who was killed in Berlin."],
  4. "005": ["Stuart Thomas", "Was 005 until defective eyesight impaired his marksmanship, and he was made head of Station G (Greece) in the Kingsley Amis novel Colonel Sun."],
  5. "006": ["Major Jack Giddings", "..."],
  6. "007": ["James Bond", "..."],
  7. "009": ["Unnamed", "..."],
  8. "0010": ["Unnamed", "..."],
  9. "0012": ["Sam Johnston", "..."]
  10. };
  11. //console.log(tabAgents);
  12. function nomAgent(codeAgent)
  13. {
  14. if (tabAgents[codeAgent][0] == "Unnamed")
  15. {
  16. tabAgents[codeAgent][0] = prompt("Cet agent est inconnu. Veuillez saisir son nom.");
  17. }
  18.  
  19. alert(tabAgents[codeAgent][0] + " - " + tabAgents[codeAgent][1]);
  20.  
  21. }
  22.  
  23. var numAgent = prompt("Veuillez saisir le code de l'agent");
  24. nomAgent(numAgent);
  25. //console.log(tabAgents);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement