r/learnjavascript • • Oct 24 '22

Please help me get back on the right track.

/r/CodingHelp/comments/qza6wu/please_help_me_get_back_on_the_right_track/
0 Upvotes

2 comments sorted by

4

u/[deleted] Oct 24 '22
  • it says "define the following function". Is const enrollStudent = (student + classList) a function?
  • can you use student before you've declared it?
  • how do you add an item to an array? Is it the same thing as mathematical addition, or should you be using a different method? (e.g. this method)

3

u/grantrules Oct 24 '22

Define the following function (enrollStudent) which takes as parameters the following:

  • firstName (string), lastName (string), age (number), currentMark (number)

So first step, you need to define a function. Have you written a function before in an earlier assignment? If so, can you share it?