โ† All Online Coding Lessons Flashcard Decks

JavaScript Coding for Kids Flashcards

7 cards from real Online Coding Lessons practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 JavaScript Coding for Kids flashcards as text
  1. What is a function in JavaScript?

    Answer: A reusable block of code

    A function groups code so you can run it again and again.

  2. How do you run a function named sayHi?

    Answer: sayHi()

    You call a function by writing its name followed by parentheses.

  3. What goes inside the parentheses when you create a function?

    Answer: Parameters (inputs)

    Parameters are the inputs a function can use when it runs.

  4. What does the return keyword do in a function?

    Answer: Sends a value back out

    The return keyword gives a result back from the function.

  5. Why are functions helpful when coding a game?

    Answer: They let you reuse code easily

    Functions let you reuse the same actions, like jumping, many times.

  6. Which is a correct way to define a simple function?

    Answer: function greet() { }

    A function starts with the word function, a name, parentheses, and braces.

  7. What is a variable that is created inside a function called?

    Answer: A local variable

    A local variable only works inside the function where it was made.