Skip to main content

Explore Variables, Types, and Collections

Learning Objectives

After completing this unit, you’ll be able to:

  • Write code to create variables and initialize them correctly.
  • Utilize strings, numbers, and dates effectively.
  • Demonstrate awareness of type coercion and its effects.
  • Distinguish truthy or falsy evaluations.
  • Demonstrate data manipulation with arrays.
  • Demonstrate how to operate the JSON object.

Key Topics

This unit prepares you for the Variables, Types, and Collections section of the Salesforce JavaScript Developer I multiple-choice exam, which makes up 23% of the overall exam. This section of the exam tests these topics.

  • Variables
  • Strings, numbers, and dates
  • Type coercion
  • Truthy or falsy evaluations
  • Data manipulation with arrays
  • JSON objects

This unit provides a number of interactive, real-world, scenario-based questions that are a lot like the ones you'll encounter as a JavaScript Developer. Looking at these scenarios helps prepare you to take the Variables, Types, and Collections section of the Salesforce JavaScript Developer I multiple-choice exam. As you tackle the practice questions, you get immediate feedback on your answers, along with detailed information on why your answers are correct (or incorrect).

The unit also contains interactive flashcards centered around study topics that help you prepare for the Variables, Types, and Collections section of the exam.

Download the Guide

Would you like a hard copy of this module’s content as a study aid? Download the Salesforce JavaScript Developer I Cert Prep: Variables, Types, Collections, Objects, Functions, and Classes guide. (Each module in this trail includes a link to a printable version of the content that you can download.)

Exam Practice Questions

Ready to jump in? The sample tool below is not scored—it's just an easy way to quiz yourself. To use it, read the scenario, then click the answer you think is correct. Some questions may have more than one correct answer. Click Submit to learn whether the answer you chose is correct or incorrect, and why. If there’s a longer explanation, click Expand button  to expand the window, then click anywhere in the window to close it. When you reach the end, you can review the answers or retake the questions.

Did you get a scenario wrong? Check out the table below for related study material.

Scenario 1
Review the MDN web docs to better understand string creation and manipulation.
Scenario 2
Study up on how to sort arrays.

Exam Topic Flashcards

The following flashcards cover Variables, Types, and Collections. Use these interactive flashcards to brush up on some of the key topics you’ll find on this part of the exam.

Read the question or term on each card, then click or tap the card to reveal the correct answer. Click the right-facing arrow to move to the next card, and the left-facing arrow to return to the previous card.

Did you get a flashcard wrong? Check out the table for related study material.

Flashcard 1
Study up on data types by reviewing MDN web docs: Data types.
Flashcard 2
Research the different keyed collection types with MDN web docs: Keyed collections.
Flashcard 3
Review template literals to understand the benefits they offer.

Looking for more information? Explore these related badges.

Badge
Content Type
JavaScript Skills for Salesforce Developers badge. JavaScript Skills for Salesforce Developers
Module
Modern JavaScript Development badge. Modern JavaScript Development
Module

You’ve reviewed Variables, Types, and Collections. Next, let’s take a look at Objects, Functions, and Classes.

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기