Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question: 1 a store has 20 apples in its inventory. how can you store t…

Question

question: 1
a store has 20 apples in its inventory. how can you store this information in a javascript variable?

  • let numapples == 20;
  • 20 = numapples;
  • let numapples = 20;
  • let num apples = 20;

Explanation:

Brief Explanations

To store a value in a JavaScript variable, we use the assignment operator =, not the comparison operator == or ===. Also, variable names cannot have spaces (so num apples is invalid). The correct syntax is let variableName = value;. So let numApples = 20; follows the correct variable declaration and assignment rules.

Answer:

C. let numApples = 20;