Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

argument parameter

Parameter is the variable in the declaration of the function.
Argument is the actual value of this variable that gets passed to the function.
Comment

argument and parameter

function myFunction(paramOne, paramTwo){
	//paramOne and paramTwo above are parameters
	//do something here
    return paramOne + paramTwo
}

myFunction(1,2) // 1 & 2 are arguments
Comment

parameters arguments

variables: any declaration
			val someVariable: String = "some variable"

parameters: variables within method/class declaration
			fun someMethod (someParameter: String) {...}
            class SomeClass (someParameter: String){...}
            
arguments: variables passed into a method/class call
			var somevariable = someMethod(someArgument)
            val someClass = SomeClass(someArgument)
            
property: variable declared within a class
			class SomeClass(val someParameter: String){
                //use parameter in class as property
                ...
            }
            
/*
Note
Source: 
https://developer.android.com/codelabs/
basic-android-kotlin-compose-classes-and-objects?
continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-2-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-classes-and-objects#6

"If constructor doesn't specify whether the properties are
mutable or immutable, it means that the parameters are
merely constructor parameters instead of class properties.
You won't be able to use them in the class, but simply
pass them to the superclass constructor."
*/
class SubClass(deviceName: String, deviceCategory: String) :
    SuperClass(name = deviceName, category = deviceCategory) {
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: Admobs For Ios 
Javascript :: load widget after read data from json file 
Javascript :: angular assign class invalid form 
Javascript :: Node-Red: 2Outputs 
Javascript :: making a react js website project ready for hosting 
Javascript :: second level relationships data not found in strapi 
Javascript :: JavaScript call url many times 
Javascript :: discord.js get message content 
Javascript :: graphql get item by id from strapi react 
Javascript :: JavaScript querySelector - Group selector 
Javascript :: how to get author in wordpress api react 
Javascript :: can not found jstl core xml file 
Javascript :: node get request filepath 
Javascript :: convert text file to string javascript 
Javascript :: material ui paper color default background 
Javascript :: javascript grow function 
Javascript :: strapi extend user model 
Javascript :: disabling first item in dropdownlist 
Javascript :: how to use window.alert in javascript 
Javascript :: convert json to .env node 
Javascript :: node "promise.all" "retry" site:stackoverflow.com 
Javascript :: build an javascript URL and its search parameters 
Javascript :: Method definition shorthand in ES6 
Javascript :: pass js variable to css animation 
Javascript :: is enabled 
Javascript :: stiches js keyframes 
Javascript :: btn click on click file javascript 
Javascript :: json mapper 
Javascript :: peopleToSendMessage 
Javascript :: React svg element rating 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =