Prepare for the Salesforce JavaScript Developer Exam. Utilize comprehensive quizzes, flashcards, and multiple choice questions with hints and explanations. Boost your exam readiness!

Practice this question and more.


What will be logged to the console when showContact is executed with the parameters: showContact('Sue', 'Johnson', 'Developer', 'Architect');?

  1. Sue Johnson, Developer

  2. Sue Johnson, Developer and Architect

  3. Developer and Architect

  4. John Doe, Developer and Architect

The correct answer is: Sue Johnson, Developer and Architect

To understand what will be logged to the console when the function `showContact` is executed with the parameters 'Sue', 'Johnson', 'Developer', 'Architect', it's crucial to look closely at the potential implementation of the `showContact` function. If the function is designed to concatenate and log the first name, last name, and then both job titles provided in the parameters, the expected output would be the full name followed by the titles. This means it would concatenate 'Sue' and 'Johnson' for the full name and then combine 'Developer' and 'Architect' for the job titles. The output 'Sue Johnson, Developer and Architect' signifies that both roles are being represented after the name, which is consistent with the behavior expected from a well-structured logging function that presents the full contact information. Thus, the function is likely arranged to provide a comprehensive outline of the contact's name along with their professional titles. This reasoning supports the outcome that includes both roles, affirming that this choice accurately reflects what would be printed to the console during the execution of the function.