SlideShare a Scribd company logo
Functions
What are functions, define and call a function, methods
Whatarefunctions?
Ablockofcodedesignedtoperformaparticulartask.
Input Function(Input) Output
Defineafunction
constfunctionName=(parameters)=>{
statement
}
Afunctionhasaname,parametersandastatement
Callafunction
Tocallafunction,writeitsnameandpassargumentsinparentheses
functionName(arguments)
Methods
Methodsarepre-builtfunctions
Number.method()
Array.method()
String.method()
...

More Related Content

What's hot

Lecture 9 access modifiers and packages
Lecture   9 access modifiers and packagesLecture   9 access modifiers and packages
Lecture 9 access modifiers and packages
manish kumar
 
Lecture 6 inheritance
Lecture   6 inheritanceLecture   6 inheritance
Lecture 6 inheritance
manish kumar
 
Functions parameters
Functions parametersFunctions parameters
Functions parameters
sidneyodingo
 
pointer, virtual function and polymorphism
pointer, virtual function and polymorphismpointer, virtual function and polymorphism
pointer, virtual function and polymorphism
ramya marichamy
 
Function in cpu 2
Function in cpu 2Function in cpu 2
Function in cpu 2
Dhaval Jalalpara
 
This pointer
This pointerThis pointer
This pointer
Kamal Acharya
 
FP 201 - Unit 6
FP 201 - Unit 6FP 201 - Unit 6
FP 201 - Unit 6rohassanie
 
Interpreter Design Pattern
Interpreter Design PatternInterpreter Design Pattern
Interpreter Design Pattern
sreymoch
 
Python functions
Python functionsPython functions
Python functions
Aliyamanasa
 
Complicated declarations in c
Complicated declarations in cComplicated declarations in c
Complicated declarations in c
Rahul Budholiya
 
Interpreter Case Study - Design Patterns
Interpreter Case Study - Design PatternsInterpreter Case Study - Design Patterns
Interpreter Case Study - Design Patterns
CodeOps Technologies LLP
 
Function in Python
Function in PythonFunction in Python
Function in Python
Yashdev Hada
 
Unit 6 pointers
Unit 6   pointersUnit 6   pointers
Unit 6 pointers
George Erfesoglou
 
3. functions modules_programs (1)
3. functions modules_programs (1)3. functions modules_programs (1)
3. functions modules_programs (1)
SaraswathiTAsstProfI
 
Functions
FunctionsFunctions
Functions
Pragnavi Erva
 
Array within a class
Array within a classArray within a class
Array within a class
AAKASH KUMAR
 
Prsentation on functions
Prsentation on functionsPrsentation on functions
Prsentation on functionsAlisha Korpal
 

What's hot (20)

Lecture 9 access modifiers and packages
Lecture   9 access modifiers and packagesLecture   9 access modifiers and packages
Lecture 9 access modifiers and packages
 
Lecture 6 inheritance
Lecture   6 inheritanceLecture   6 inheritance
Lecture 6 inheritance
 
Functions parameters
Functions parametersFunctions parameters
Functions parameters
 
pointer, virtual function and polymorphism
pointer, virtual function and polymorphismpointer, virtual function and polymorphism
pointer, virtual function and polymorphism
 
Function in cpu 2
Function in cpu 2Function in cpu 2
Function in cpu 2
 
This pointer
This pointerThis pointer
This pointer
 
FP 201 - Unit 6
FP 201 - Unit 6FP 201 - Unit 6
FP 201 - Unit 6
 
Interpreter Design Pattern
Interpreter Design PatternInterpreter Design Pattern
Interpreter Design Pattern
 
Functions in python
Functions in python Functions in python
Functions in python
 
Python functions
Python functionsPython functions
Python functions
 
Complicated declarations in c
Complicated declarations in cComplicated declarations in c
Complicated declarations in c
 
Interpreter Case Study - Design Patterns
Interpreter Case Study - Design PatternsInterpreter Case Study - Design Patterns
Interpreter Case Study - Design Patterns
 
Function in Python
Function in PythonFunction in Python
Function in Python
 
Unit 6 pointers
Unit 6   pointersUnit 6   pointers
Unit 6 pointers
 
3. functions modules_programs (1)
3. functions modules_programs (1)3. functions modules_programs (1)
3. functions modules_programs (1)
 
Functions
FunctionsFunctions
Functions
 
Function
FunctionFunction
Function
 
Ch4 functions
Ch4 functionsCh4 functions
Ch4 functions
 
Array within a class
Array within a classArray within a class
Array within a class
 
Prsentation on functions
Prsentation on functionsPrsentation on functions
Prsentation on functions
 

More from Low-Code Starter Pack

What are APIs?
What are APIs?What are APIs?
What are APIs?
Low-Code Starter Pack
 
What is a database?
What is a database?What is a database?
What is a database?
Low-Code Starter Pack
 
What is SQL?
What is SQL?What is SQL?
What is SQL?
Low-Code Starter Pack
 
Json
JsonJson
Debugging
DebuggingDebugging
HTML elements
HTML elementsHTML elements
HTML elements
Low-Code Starter Pack
 
Control flow
Control flowControl flow
Control flow
Low-Code Starter Pack
 
Postman
PostmanPostman
HTTP requests
HTTP requestsHTTP requests
HTTP requests
Low-Code Starter Pack
 
Variables
VariablesVariables
3 powerful modules
3 powerful modules3 powerful modules
3 powerful modules
Low-Code Starter Pack
 
HTML syntax
HTML syntaxHTML syntax
What is CSS?
What is CSS?What is CSS?
What is CSS?
Low-Code Starter Pack
 
Data types
Data typesData types
What is Integromat?
What is Integromat?What is Integromat?
What is Integromat?
Low-Code Starter Pack
 
What is HTTP?
What is HTTP?What is HTTP?
What is HTTP?
Low-Code Starter Pack
 
How is CSS applied?
How is CSS applied?How is CSS applied?
How is CSS applied?
Low-Code Starter Pack
 
HTTP responses
HTTP responsesHTTP responses
HTTP responses
Low-Code Starter Pack
 
Webhooks
WebhooksWebhooks
Airtable advanced
Airtable advancedAirtable advanced
Airtable advanced
Low-Code Starter Pack
 

More from Low-Code Starter Pack (20)

What are APIs?
What are APIs?What are APIs?
What are APIs?
 
What is a database?
What is a database?What is a database?
What is a database?
 
What is SQL?
What is SQL?What is SQL?
What is SQL?
 
Json
JsonJson
Json
 
Debugging
DebuggingDebugging
Debugging
 
HTML elements
HTML elementsHTML elements
HTML elements
 
Control flow
Control flowControl flow
Control flow
 
Postman
PostmanPostman
Postman
 
HTTP requests
HTTP requestsHTTP requests
HTTP requests
 
Variables
VariablesVariables
Variables
 
3 powerful modules
3 powerful modules3 powerful modules
3 powerful modules
 
HTML syntax
HTML syntaxHTML syntax
HTML syntax
 
What is CSS?
What is CSS?What is CSS?
What is CSS?
 
Data types
Data typesData types
Data types
 
What is Integromat?
What is Integromat?What is Integromat?
What is Integromat?
 
What is HTTP?
What is HTTP?What is HTTP?
What is HTTP?
 
How is CSS applied?
How is CSS applied?How is CSS applied?
How is CSS applied?
 
HTTP responses
HTTP responsesHTTP responses
HTTP responses
 
Webhooks
WebhooksWebhooks
Webhooks
 
Airtable advanced
Airtable advancedAirtable advanced
Airtable advanced
 

Recently uploaded

Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 

Recently uploaded (20)

Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)