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 (9)

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

Similar to Storage in programming (20)

PPTX
17-Arrays-And-Files-kkkkkkkkkkkkkkk.pptx
kamalsmail1
 
PPT
Savitch Ch 07
Terry Yoast
 
PPT
Savitch Ch 07
Terry Yoast
 
PPT
Savitch ch 07
Terry Yoast
 
PPT
Arrays Class presentation
Neveen Reda
 
PPT
Array
vrgokila
 
PPTX
ADVANCED DATA STRUCTURES AND ALGORITHMS.pptx
brajmohan21nitj
 
PPTX
Javascript 101
Shlomi Komemi
 
PPTX
Arrays
shillpi29
 
PDF
Array
Scott Donald
 
PPT
02. Data Type and Variables
Tommy Vercety
 
DOCX
Java R20 - UNIT-3.docx
Pamarthi Kumar
 
PDF
Class notes(week 4) on arrays and strings
Kuntal Bhowmick
 
PDF
Arrays
ViniVini48
 
PPTX
Arrays.pptx
saimasiddique11
 
DOCX
Class notes(week 4) on arrays and strings
Kuntal Bhowmick
 
PPT
Mesics lecture 8 arrays in 'c'
eShikshak
 
PPT
Chap09
Terry Yoast
 
PPT
17-Arrays en java presentación documento
DiegoGamboaSafla
 
PDF
Arrays and library functions
Swarup Kumar Boro
 
17-Arrays-And-Files-kkkkkkkkkkkkkkk.pptx
kamalsmail1
 
Savitch Ch 07
Terry Yoast
 
Savitch Ch 07
Terry Yoast
 
Savitch ch 07
Terry Yoast
 
Arrays Class presentation
Neveen Reda
 
Array
vrgokila
 
ADVANCED DATA STRUCTURES AND ALGORITHMS.pptx
brajmohan21nitj
 
Javascript 101
Shlomi Komemi
 
Arrays
shillpi29
 
02. Data Type and Variables
Tommy Vercety
 
Java R20 - UNIT-3.docx
Pamarthi Kumar
 
Class notes(week 4) on arrays and strings
Kuntal Bhowmick
 
Arrays
ViniVini48
 
Arrays.pptx
saimasiddique11
 
Class notes(week 4) on arrays and strings
Kuntal Bhowmick
 
Mesics lecture 8 arrays in 'c'
eShikshak
 
Chap09
Terry Yoast
 
17-Arrays en java presentación documento
DiegoGamboaSafla
 
Arrays and library functions
Swarup Kumar Boro
 
Ad

More from Codewizacademy (20)

PPTX
Implementing OODA Loop in online teaching
Codewizacademy
 
PPTX
Tie up loose ends
Codewizacademy
 
PPTX
Reflect
Codewizacademy
 
PPTX
Review
Codewizacademy
 
PPTX
Revise
Codewizacademy
 
PPTX
Organizing content of course
Codewizacademy
 
PPTX
Rules and policies for course
Codewizacademy
 
PPTX
Content Creation
Codewizacademy
 
PPTX
Taxonomies
Codewizacademy
 
PPTX
Course outline
Codewizacademy
 
PPTX
Course development
Codewizacademy
 
PPTX
Looping
Codewizacademy
 
PPTX
Conditional Constructs in Javascript
Codewizacademy
 
PPTX
Displaying message on web page in Javascript
Codewizacademy
 
PPTX
Programming fundamentals through javascript
Codewizacademy
 
PPTX
Cyber Security
Codewizacademy
 
PPTX
Website Security
Codewizacademy
 
PPTX
Website Cookies
Codewizacademy
 
PPTX
GDPR- General Data Protection Regulation
Codewizacademy
 
PPTX
CSS- Cascading Style Sheet
Codewizacademy
 
Implementing OODA Loop in online teaching
Codewizacademy
 
Tie up loose ends
Codewizacademy
 
Organizing content of course
Codewizacademy
 
Rules and policies for course
Codewizacademy
 
Content Creation
Codewizacademy
 
Taxonomies
Codewizacademy
 
Course outline
Codewizacademy
 
Course development
Codewizacademy
 
Conditional Constructs in Javascript
Codewizacademy
 
Displaying message on web page in Javascript
Codewizacademy
 
Programming fundamentals through javascript
Codewizacademy
 
Cyber Security
Codewizacademy
 
Website Security
Codewizacademy
 
Website Cookies
Codewizacademy
 
GDPR- General Data Protection Regulation
Codewizacademy
 
CSS- Cascading Style Sheet
Codewizacademy
 
Ad

Recently uploaded (20)

PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
community health nursing question paper 2.pdf
Prince kumar
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 

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/