SlideShare a Scribd company logo
Storage
Variables
Constants
Arrays
Kinds of Data
• User generated data
• Program Data
User Inputs
Storage
var msg="Hello World"
Program Data
User Generated Data
Input
User Generated Data
Interact
User Interaction
Program
Content
Program Data
Data available beforehand
Data processed via program
janData
janData
Variable
Variable and Constant
PI
PI
Constant
Storage
Storage
Variable
• Named storage location in memory
• By convention follow 'Camel Case' for naming
Eg:
– bigApple
– usbMic
• Value may change during program processing
• Can hold a single value
Variable
• Use word-let
let message = "Hello World";
alert (message);
let bigApple = 20;
alert(bigApple);
let user='Gauri', age= 20, message='Good Day';
alert(message + " "+user +" "+ age);
Constant
• Named storage location in memory
• By convention follow 'All Caps' for naming. Eg:
– BIGAPPLE
– USBMIC
• Value may never change during program
processing
• Can hold a single value
Constant
• Use word- const
const piv = 3.14;
window.alert("Value of pi: "+ piv);
Data Type
• Data is any form of information
• Number
– Integer
– Decimal
• String
– Combination of characters, integers and symbols
• Boolean
– Yes/No
Data Type
• Null
– Null value
• Undefined
– Variable or Constant that is not initialized
• Object
– Complex data structures
• Symbol
– Unique Identifiers
Array
• Named storage location in memory
• Can hold multiple values of same data type
• By convention follow 'Camel Case' for a variable array
name or 'All Caps' for a constant array name. Eg:
– bigApple
– usbMic
• Name should be plural since array is collection of
values.
• Value of variable array may change during program
processing
• Value of constant array may change during program
processing but cannot be reassigned
Array
23 45 33 65 76 77
7 4 3 6
apple[0] apple[1] apple[2] apple[3] apple[4] apple[5]
INTR[0] INTR[1] INTR[2] INTR[3]
An array index always starts from 0. If we have an array of 10
elements, then the elements to be referred to will be 0-9. Here,
the length of array will be 10.
For example: Integer array of 6 elements for storing the price of 6 varieties of
apple.
var apple = new Array(6);
apple[0] = 23;……
Integer array of 4 elements for storing the interest rate of 4 bank products
eg. Fixed Deposit, Saving A/c, Current A/c, Recurring Deposit will be constant.
const INTR = new Array(4);
JAN
FEB
MAR
APR
MAY
JUN
JAN
FEB
MAR
APR
MAY
JUN
Array
Array
Difference
Variables Constants Arrays
Value may vary. Value can
change once or multiple
times via processing
during the lifetime of
program.
Value remains constant.
Cannot change through
out the lifetime of
program.
Value may vary for each
element individually
during the lifetime of
program.
Stores single value Stores single value Stores multiple values
depending on the length
of array in different
elements.
Storing data in JS
https://www.codewizacademy.com
https://www.facebook.com/codewizacademy/
https://www.instagram.com/codewizacademy/

More Related Content

What's hot

A vertical representation in frequent item set mining
A vertical representation in frequent item set miningA vertical representation in frequent item set mining
A vertical representation in frequent item set mining
Dr.Manmohan Singh
 
Apriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule MiningApriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule Mining
Wan Aezwani Wab
 
Heaptree
HeaptreeHeaptree
Heaptree
Rajapriya82
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Junghoon Kim
 
1.9.association mining 1
1.9.association mining 11.9.association mining 1
1.9.association mining 1
Krish_ver2
 
ArrayList in JAVA
ArrayList in JAVAArrayList in JAVA
ArrayList in JAVA
SAGARDAVE29
 
Data structures and algorithms arrays
Data structures and algorithms   arraysData structures and algorithms   arrays
Data structures and algorithms arrays
chauhankapil
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Ashis Kumar Chanda
 
Heap Sort || Heapify Method || Build Max Heap Algorithm
Heap Sort || Heapify Method || Build Max Heap AlgorithmHeap Sort || Heapify Method || Build Max Heap Algorithm
Heap Sort || Heapify Method || Build Max Heap Algorithm
Learning Courses Online
 

What's hot (9)

A vertical representation in frequent item set mining
A vertical representation in frequent item set miningA vertical representation in frequent item set mining
A vertical representation in frequent item set mining
 
Apriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule MiningApriori and Eclat algorithm in Association Rule Mining
Apriori and Eclat algorithm in Association Rule Mining
 
Heaptree
HeaptreeHeaptree
Heaptree
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
1.9.association mining 1
1.9.association mining 11.9.association mining 1
1.9.association mining 1
 
ArrayList in JAVA
ArrayList in JAVAArrayList in JAVA
ArrayList in JAVA
 
Data structures and algorithms arrays
Data structures and algorithms   arraysData structures and algorithms   arrays
Data structures and algorithms arrays
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
Heap Sort || Heapify Method || Build Max Heap Algorithm
Heap Sort || Heapify Method || Build Max Heap AlgorithmHeap Sort || Heapify Method || Build Max Heap Algorithm
Heap Sort || Heapify Method || Build Max Heap Algorithm
 

Similar to Storage in programming

CPP05 - Arrays
CPP05 - ArraysCPP05 - Arrays
CPP05 - Arrays
Michael Heron
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
DianaGray10
 
JavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient JavaJavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient Java
Chris Bailey
 
Essbase Statistics DW: How to Automatically Administrate Essbase Using ODI
Essbase Statistics DW: How to Automatically Administrate Essbase Using ODIEssbase Statistics DW: How to Automatically Administrate Essbase Using ODI
Essbase Statistics DW: How to Automatically Administrate Essbase Using ODI
Rodrigo Radtke de Souza
 
Unit 1
Unit 1Unit 1
Java Basics.pdf
Java Basics.pdfJava Basics.pdf
Java Basics.pdf
EdFeranil
 
MLProjectReport
MLProjectReportMLProjectReport
MLProjectReport
Uday Mittal
 
CSC111-Chap_02.pdf
CSC111-Chap_02.pdfCSC111-Chap_02.pdf
CSC111-Chap_02.pdf
2b75fd3051
 
So you want to liberate your data?
So you want to liberate your data?So you want to liberate your data?
So you want to liberate your data?
Mogens Heller Grabe
 
Sample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docxSample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docx
todd331
 
advancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptxadvancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptx
ssuser6a1dbf
 
Low memory footprint programs-iSeries
Low memory footprint programs-iSeriesLow memory footprint programs-iSeries
Low memory footprint programs-iSeries
Prithiviraj Damodaran
 
Core java
Core javaCore java
Core java
Shivaraj R
 
Core java
Core javaCore java
Core java
Sun Technlogies
 
Data herding
Data herdingData herding
Data herding
unbracketed
 
Data herding
Data herdingData herding
Data herding
unbracketed
 
Core java &collections
Core java &collectionsCore java &collections
Core java &collections
Ravi varma
 
Core java1
Core java1Core java1
Core java1
Ravi varma
 
Core java
Core java Core java
Core java
Ravi varma
 
General Programming Concept
General Programming ConceptGeneral Programming Concept
General Programming Concept
Haris Bin Zahid
 

Similar to Storage in programming (20)

CPP05 - Arrays
CPP05 - ArraysCPP05 - Arrays
CPP05 - Arrays
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 
JavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient JavaJavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient Java
 
Essbase Statistics DW: How to Automatically Administrate Essbase Using ODI
Essbase Statistics DW: How to Automatically Administrate Essbase Using ODIEssbase Statistics DW: How to Automatically Administrate Essbase Using ODI
Essbase Statistics DW: How to Automatically Administrate Essbase Using ODI
 
Unit 1
Unit 1Unit 1
Unit 1
 
Java Basics.pdf
Java Basics.pdfJava Basics.pdf
Java Basics.pdf
 
MLProjectReport
MLProjectReportMLProjectReport
MLProjectReport
 
CSC111-Chap_02.pdf
CSC111-Chap_02.pdfCSC111-Chap_02.pdf
CSC111-Chap_02.pdf
 
So you want to liberate your data?
So you want to liberate your data?So you want to liberate your data?
So you want to liberate your data?
 
Sample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docxSample Questions The following sample questions are not in.docx
Sample Questions The following sample questions are not in.docx
 
advancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptxadvancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptx
 
Low memory footprint programs-iSeries
Low memory footprint programs-iSeriesLow memory footprint programs-iSeries
Low memory footprint programs-iSeries
 
Core java
Core javaCore java
Core java
 
Core java
Core javaCore java
Core java
 
Data herding
Data herdingData herding
Data herding
 
Data herding
Data herdingData herding
Data herding
 
Core java &collections
Core java &collectionsCore java &collections
Core java &collections
 
Core java1
Core java1Core java1
Core java1
 
Core java
Core java Core java
Core java
 
General Programming Concept
General Programming ConceptGeneral Programming Concept
General Programming Concept
 

More from Codewizacademy

Implementing OODA Loop in online teaching
Implementing OODA Loop in online teachingImplementing OODA Loop in online teaching
Implementing OODA Loop in online teaching
Codewizacademy
 
Tie up loose ends
Tie up loose endsTie up loose ends
Tie up loose ends
Codewizacademy
 
Reflect
ReflectReflect
Review
ReviewReview
Revise
ReviseRevise
Organizing content of course
Organizing content of courseOrganizing content of course
Organizing content of course
Codewizacademy
 
Rules and policies for course
Rules and policies for courseRules and policies for course
Rules and policies for course
Codewizacademy
 
Content Creation
Content CreationContent Creation
Content Creation
Codewizacademy
 
Taxonomies
TaxonomiesTaxonomies
Taxonomies
Codewizacademy
 
Course outline
Course outlineCourse outline
Course outline
Codewizacademy
 
Course development
Course developmentCourse development
Course development
Codewizacademy
 
Looping
LoopingLooping
Conditional Constructs in Javascript
Conditional Constructs in JavascriptConditional Constructs in Javascript
Conditional Constructs in Javascript
Codewizacademy
 
Displaying message on web page in Javascript
Displaying message on web page in JavascriptDisplaying message on web page in Javascript
Displaying message on web page in Javascript
Codewizacademy
 
Programming fundamentals through javascript
Programming fundamentals through javascriptProgramming fundamentals through javascript
Programming fundamentals through javascript
Codewizacademy
 
Cyber Security
Cyber SecurityCyber Security
Cyber Security
Codewizacademy
 
Website Security
Website SecurityWebsite Security
Website Security
Codewizacademy
 
Website Cookies
Website CookiesWebsite Cookies
Website Cookies
Codewizacademy
 
GDPR- General Data Protection Regulation
GDPR- General Data Protection RegulationGDPR- General Data Protection Regulation
GDPR- General Data Protection Regulation
Codewizacademy
 
CSS- Cascading Style Sheet
CSS- Cascading Style SheetCSS- Cascading Style Sheet
CSS- Cascading Style Sheet
Codewizacademy
 

More from Codewizacademy (20)

Implementing OODA Loop in online teaching
Implementing OODA Loop in online teachingImplementing OODA Loop in online teaching
Implementing OODA Loop in online teaching
 
Tie up loose ends
Tie up loose endsTie up loose ends
Tie up loose ends
 
Reflect
ReflectReflect
Reflect
 
Review
ReviewReview
Review
 
Revise
ReviseRevise
Revise
 
Organizing content of course
Organizing content of courseOrganizing content of course
Organizing content of course
 
Rules and policies for course
Rules and policies for courseRules and policies for course
Rules and policies for course
 
Content Creation
Content CreationContent Creation
Content Creation
 
Taxonomies
TaxonomiesTaxonomies
Taxonomies
 
Course outline
Course outlineCourse outline
Course outline
 
Course development
Course developmentCourse development
Course development
 
Looping
LoopingLooping
Looping
 
Conditional Constructs in Javascript
Conditional Constructs in JavascriptConditional Constructs in Javascript
Conditional Constructs in Javascript
 
Displaying message on web page in Javascript
Displaying message on web page in JavascriptDisplaying message on web page in Javascript
Displaying message on web page in Javascript
 
Programming fundamentals through javascript
Programming fundamentals through javascriptProgramming fundamentals through javascript
Programming fundamentals through javascript
 
Cyber Security
Cyber SecurityCyber Security
Cyber Security
 
Website Security
Website SecurityWebsite Security
Website Security
 
Website Cookies
Website CookiesWebsite Cookies
Website Cookies
 
GDPR- General Data Protection Regulation
GDPR- General Data Protection RegulationGDPR- General Data Protection Regulation
GDPR- General Data Protection Regulation
 
CSS- Cascading Style Sheet
CSS- Cascading Style SheetCSS- Cascading Style Sheet
CSS- Cascading Style Sheet
 

Recently uploaded

South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 

Recently uploaded (20)

South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 

Storage in programming

  • 2. Kinds of Data • User generated data • Program Data User Inputs Storage var msg="Hello World" Program Data
  • 3. User Generated Data Input User Generated Data Interact User Interaction Program Content
  • 4. Program Data Data available beforehand Data processed via program
  • 6. Variable • Named storage location in memory • By convention follow 'Camel Case' for naming Eg: – bigApple – usbMic • Value may change during program processing • Can hold a single value
  • 7. Variable • Use word-let let message = "Hello World"; alert (message); let bigApple = 20; alert(bigApple); let user='Gauri', age= 20, message='Good Day'; alert(message + " "+user +" "+ age);
  • 8. Constant • Named storage location in memory • By convention follow 'All Caps' for naming. Eg: – BIGAPPLE – USBMIC • Value may never change during program processing • Can hold a single value
  • 9. Constant • Use word- const const piv = 3.14; window.alert("Value of pi: "+ piv);
  • 10. Data Type • Data is any form of information • Number – Integer – Decimal • String – Combination of characters, integers and symbols • Boolean – Yes/No
  • 11. Data Type • Null – Null value • Undefined – Variable or Constant that is not initialized • Object – Complex data structures • Symbol – Unique Identifiers
  • 12. Array • Named storage location in memory • Can hold multiple values of same data type • By convention follow 'Camel Case' for a variable array name or 'All Caps' for a constant array name. Eg: – bigApple – usbMic • Name should be plural since array is collection of values. • Value of variable array may change during program processing • Value of constant array may change during program processing but cannot be reassigned
  • 13. Array 23 45 33 65 76 77 7 4 3 6 apple[0] apple[1] apple[2] apple[3] apple[4] apple[5] INTR[0] INTR[1] INTR[2] INTR[3] An array index always starts from 0. If we have an array of 10 elements, then the elements to be referred to will be 0-9. Here, the length of array will be 10. For example: Integer array of 6 elements for storing the price of 6 varieties of apple. var apple = new Array(6); apple[0] = 23;…… Integer array of 4 elements for storing the interest rate of 4 bank products eg. Fixed Deposit, Saving A/c, Current A/c, Recurring Deposit will be constant. const INTR = new Array(4);
  • 15. Difference Variables Constants Arrays Value may vary. Value can change once or multiple times via processing during the lifetime of program. Value remains constant. Cannot change through out the lifetime of program. Value may vary for each element individually during the lifetime of program. Stores single value Stores single value Stores multiple values depending on the length of array in different elements.
  • 16. Storing data in JS https://www.codewizacademy.com https://www.facebook.com/codewizacademy/ https://www.instagram.com/codewizacademy/