# Amt as function parameter - where does it come from?

**URL:** https://forum.code.org/t/amt-as-function-parameter-where-does-it-come-from/26305
**Category:** Unit and Lesson Discussion
**Tags:** csp-unit-5-lesson-10
**Created:** [April 12, 2019, 12:22pm UTC](https://forum.code.org/t/amt-as-function-parameter-where-does-it-come-from/26305 "2019-04-12T12:22:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mbrunner](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mbrunner/32/5271_2.png) [@mbrunner](https://forum.code.org/u/mbrunner)
#### Post date: [April 12, 2019, 12:22pm UTC](https://forum.code.org/t/amt-as-function-parameter-where-does-it-come-from/26305/1 "2019-04-12T12:22:00Z")

</div>

Hi!

When defining the function UpdateScoreBy I noticed that the parameter “amt” is not mentioned anywhere else as a variable or in design mode as a UI object label. I realize this stands for amount, but I don’t understand how the computer knows what this means or is supposed to do. I looked through the documentation on App Lab (at least as much as I could figure out) and the W3Schools references, but didn’t see amt.

If you can enlighten me that would be great!

mb

---

<div class="post-metadata">

### Author: ![jhall9](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jhall9](https://forum.code.org/u/jhall9)
#### Post date: [April 12, 2019, 1:18pm UTC](https://forum.code.org/t/amt-as-function-parameter-where-does-it-come-from/26305/2 "2019-04-12T13:18:28Z")

</div>

When defining a function you can include parameters (information that is going to be sent to the function). When using parameters, you do not need to declare them as variables.

// Function Call  
UpdateScoreBy(3);  
UpdateScoreBy(-1);

// Function Definition  
function UpdateScoreBy (amount){

}

The first function call sends the value 3, so the function assigns 3 to amount. And inside the function amount represents 3.

The second function call sends the value -1, so the function assigns -1 to amount. And inside the function amount represents -1.

You can label your parameters whatever label makes sense - amt or amount or Amnt.

---

<div class="post-metadata">

### Author: ![mbrunner](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mbrunner/32/5271_2.png) [@mbrunner](https://forum.code.org/u/mbrunner)
#### Post date: [April 12, 2019, 1:19pm UTC](https://forum.code.org/t/amt-as-function-parameter-where-does-it-come-from/26305/3 "2019-04-12T13:19:51Z")

</div>

Thanks so much! Love when it clicks!

---

<div class="post-metadata">

### Author: ![successm](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/successm/32/6144_2.png) [@successm](https://forum.code.org/u/successm)
#### Post date: [November 10, 2020, 9:57am UTC](https://forum.code.org/t/amt-as-function-parameter-where-does-it-come-from/26305/4 "2020-11-10T09:57:37Z")

</div>

sorry mbrunner cant help you
