SlideShare uma empresa Scribd logo
1 de 13
Native applications have the best performance, highest security, and best user
experience.
Display hello
Variable bnane ke 3
tarike:
Issue with var type
Issue 1.Output will be undefine but error ana chahiye tha
Becs js engine is code ko mence
“Var x” ko top me patak deta hai
This concept(variable declaration shift to top) is called variable Hoisting
Hoisting is JavaScript's default behavior of moving
declarations to the top.
Note : Let n const type return error
instead of undefine becs it will not hoist
‘Var ‘Issue 2.Also here redeclaration are allowed but
in ‘let’ not allowed
Output: here 30 is overriten with 60
But not to be an error while it is declared erlier
too
But gives error in ‘let’ redeclaration
Output:
Var issue 3.scoping issue output
No issue with ‘let’ Output:
Const cant be changed or redeclared
Falsy
values:
Except above these all truthy values
Output:
Here this meance if name exist then return name
else return ‘User’
is a non-premitive data type in JS
It will store values in key: value pair
or
Or using ‘object destructuring’ ,we will pull out or khinch liya from inside object
For code cleaner or not repeted
or
U can rename as:
Key and value can be with same name
So ,it can be written direct :
Js function can be called before definition
due to function hoisting by js engine
So this is an issue that Function ko ek constant
me assign kr denge
that can ve solved
by using arrow function
output
parameterise
or
returning
Single sttement definitin can be written without {}
And return keyword for return
Object passing as a function argument n destructing n callin
Object destructuring direct inside parameter
Returning object
If is single line : Here we must give () becs js engine ko batana
padega ki object hai na ki function ki body
N we can get result
There are 7 primitive data types: string, number,
bigint, boolean, undefined, symbol, and null.
Rteference type act as a pointer in c,
If we change refrenced variable or object value then will be
changed in actual object vaor variable value
Here we change value of
obj1 but changed obj2 too
Premitive me copy variable me
value change hone se actual variable
me value koi change ni hota hai
Output:
output
Same in array becs array is also reference type:
Output:
Actual way to copy an object using
spread operator(...)
Output:
... obj se chije bahar (unpack hona )
nikal jati hai n fir se ek object ke
inside wrap kr diya As below :
Spread operator is usefull when copy of
another object values in new object with
adding or replace more item
Add item:
Replace item:
Output:
Copy array usning spread (...) operator
... Sprd oprtr se unpack ho gya the wapis
Se arr [] oprtr use krke pack kr diya
Copy two arrays into another array
output
Array destructuring
Array
iteration:
Using call back function in for each:
Array of objects inside array:
Change array objects value inside array:
Array Map:
Use for iterate array meanwhile
returns a new array:
Array Filter:
Or in single line if contain singe line
Dynamically remove items from array by passing parameter:
Filter multiple values by given condition:
Fetch method:returns promises that promiss to return sure or reject
If return then output in array object fron json(http) response
If single line return
OOP
import React from 'react';
import {Text, View } from 'react-native';
const App=()=> {
return (
<View>
<Text>Hello jaipur......!</Text>
</View>
);
}
export default App;
npm install expo-cli --global
expo init myReactNativeProject
cd myReactNativeProject
expo start
import React from 'react';
import { StyleSheet, Text, View } from 'react-
native';
export default function App() {
return (
<View>
<Text>Hello jaipur......!</Text>
</View>
);
}
Button with click
And
textBox
import React from 'react';
import {Text, View ,Button,TextInput} from 'react-native';
export default function App() {
const logIn=()=>{
alert('hello');
}
return (
<View style={{width:500,marginLeft:100}}>
<Text> Hello jaipur......!</Text>
<View style={{width:100,marginLeft:10}}>
<TextInput placeholder={'enter user name'}></TextInput>
<Button onPress={logIn} title='hitt!!!'/>
</View>
</View>
);
}

Mais conteúdo relacionado

Semelhante a native 21.pptx

Python_Unit_2.pdf
Python_Unit_2.pdfPython_Unit_2.pdf
Python_Unit_2.pdfalaparthi
 
please please modify the code and update with whole code with modifi.pdf
please please modify the code and update with whole code with modifi.pdfplease please modify the code and update with whole code with modifi.pdf
please please modify the code and update with whole code with modifi.pdfrmwaterlife
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0tutorialsruby
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0tutorialsruby
 
C++ code, please help! RESPOND W COMPLETED CODE PLEASE, am using V.pdf
C++ code, please help! RESPOND W COMPLETED CODE PLEASE,  am using V.pdfC++ code, please help! RESPOND W COMPLETED CODE PLEASE,  am using V.pdf
C++ code, please help! RESPOND W COMPLETED CODE PLEASE, am using V.pdfrahulfancycorner21
 
Workshop 19: ReactJS Introduction
Workshop 19: ReactJS IntroductionWorkshop 19: ReactJS Introduction
Workshop 19: ReactJS IntroductionVisual Engineering
 
Chap-2 Classes & Methods.pptx
Chap-2 Classes & Methods.pptxChap-2 Classes & Methods.pptx
Chap-2 Classes & Methods.pptxchetanpatilcp783
 
vectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptx
vectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptxvectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptx
vectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptxVivekSharma34623
 
Read carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdfRead carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdfbharatchawla141
 
Ap Power Point Chpt2
Ap Power Point Chpt2Ap Power Point Chpt2
Ap Power Point Chpt2dplunkett
 
What is a constructorAns)A constructor is also type of method whi.pdf
What is a constructorAns)A constructor is also type of method whi.pdfWhat is a constructorAns)A constructor is also type of method whi.pdf
What is a constructorAns)A constructor is also type of method whi.pdfanandanand521251
 
Operator overloading
Operator overloadingOperator overloading
Operator overloadingBurhan Ahmed
 
Romero Blueprint Compendium
Romero Blueprint CompendiumRomero Blueprint Compendium
Romero Blueprint CompendiumUnreal Engine
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side JavascriptJulie Iskander
 

Semelhante a native 21.pptx (20)

Python_Unit_2.pdf
Python_Unit_2.pdfPython_Unit_2.pdf
Python_Unit_2.pdf
 
please please modify the code and update with whole code with modifi.pdf
please please modify the code and update with whole code with modifi.pdfplease please modify the code and update with whole code with modifi.pdf
please please modify the code and update with whole code with modifi.pdf
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0
 
Memory Management In C++
Memory Management In C++Memory Management In C++
Memory Management In C++
 
C++ code, please help! RESPOND W COMPLETED CODE PLEASE, am using V.pdf
C++ code, please help! RESPOND W COMPLETED CODE PLEASE,  am using V.pdfC++ code, please help! RESPOND W COMPLETED CODE PLEASE,  am using V.pdf
C++ code, please help! RESPOND W COMPLETED CODE PLEASE, am using V.pdf
 
Workshop 19: ReactJS Introduction
Workshop 19: ReactJS IntroductionWorkshop 19: ReactJS Introduction
Workshop 19: ReactJS Introduction
 
Chapter3
Chapter3Chapter3
Chapter3
 
Chap-2 Classes & Methods.pptx
Chap-2 Classes & Methods.pptxChap-2 Classes & Methods.pptx
Chap-2 Classes & Methods.pptx
 
vectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptx
vectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptxvectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptx
vectors.(join ALL INDIA POLYTECHNIC (AICTE)).pptx
 
Read carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdfRead carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdf
 
Vb script final pari
Vb script final pariVb script final pari
Vb script final pari
 
Ap Power Point Chpt2
Ap Power Point Chpt2Ap Power Point Chpt2
Ap Power Point Chpt2
 
03. Week 03.pptx
03. Week 03.pptx03. Week 03.pptx
03. Week 03.pptx
 
C code examples
C code examplesC code examples
C code examples
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 
What is a constructorAns)A constructor is also type of method whi.pdf
What is a constructorAns)A constructor is also type of method whi.pdfWhat is a constructorAns)A constructor is also type of method whi.pdf
What is a constructorAns)A constructor is also type of method whi.pdf
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
Romero Blueprint Compendium
Romero Blueprint CompendiumRomero Blueprint Compendium
Romero Blueprint Compendium
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
 

Mais de ajeetyadav541305

Mais de ajeetyadav541305 (6)

SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Python Development.pptx
Python Development.pptxPython Development.pptx
Python Development.pptx
 
PHP - Introduction.pptx
PHP - Introduction.pptxPHP - Introduction.pptx
PHP - Introduction.pptx
 
Java Framework Training.pdf
Java Framework Training.pdfJava Framework Training.pdf
Java Framework Training.pdf
 
C C++ .pdf
C C++ .pdfC C++ .pdf
C C++ .pdf
 
Java Training Institute In Jaipur.pdf
Java Training Institute In Jaipur.pdfJava Training Institute In Jaipur.pdf
Java Training Institute In Jaipur.pdf
 

Último

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Último (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

native 21.pptx

  • 1. Native applications have the best performance, highest security, and best user experience.
  • 2. Display hello Variable bnane ke 3 tarike: Issue with var type Issue 1.Output will be undefine but error ana chahiye tha Becs js engine is code ko mence “Var x” ko top me patak deta hai This concept(variable declaration shift to top) is called variable Hoisting Hoisting is JavaScript's default behavior of moving declarations to the top. Note : Let n const type return error instead of undefine becs it will not hoist ‘Var ‘Issue 2.Also here redeclaration are allowed but in ‘let’ not allowed Output: here 30 is overriten with 60 But not to be an error while it is declared erlier too But gives error in ‘let’ redeclaration Output: Var issue 3.scoping issue output No issue with ‘let’ Output: Const cant be changed or redeclared
  • 3. Falsy values: Except above these all truthy values Output: Here this meance if name exist then return name else return ‘User’
  • 4. is a non-premitive data type in JS It will store values in key: value pair or Or using ‘object destructuring’ ,we will pull out or khinch liya from inside object For code cleaner or not repeted or U can rename as:
  • 5. Key and value can be with same name So ,it can be written direct : Js function can be called before definition due to function hoisting by js engine So this is an issue that Function ko ek constant me assign kr denge that can ve solved by using arrow function output parameterise or returning Single sttement definitin can be written without {} And return keyword for return Object passing as a function argument n destructing n callin Object destructuring direct inside parameter
  • 6. Returning object If is single line : Here we must give () becs js engine ko batana padega ki object hai na ki function ki body N we can get result There are 7 primitive data types: string, number, bigint, boolean, undefined, symbol, and null. Rteference type act as a pointer in c, If we change refrenced variable or object value then will be changed in actual object vaor variable value Here we change value of obj1 but changed obj2 too Premitive me copy variable me value change hone se actual variable me value koi change ni hota hai Output: output Same in array becs array is also reference type: Output:
  • 7. Actual way to copy an object using spread operator(...) Output: ... obj se chije bahar (unpack hona ) nikal jati hai n fir se ek object ke inside wrap kr diya As below : Spread operator is usefull when copy of another object values in new object with adding or replace more item Add item: Replace item: Output: Copy array usning spread (...) operator ... Sprd oprtr se unpack ho gya the wapis Se arr [] oprtr use krke pack kr diya
  • 8. Copy two arrays into another array output Array destructuring Array iteration: Using call back function in for each: Array of objects inside array:
  • 9. Change array objects value inside array: Array Map: Use for iterate array meanwhile returns a new array: Array Filter: Or in single line if contain singe line Dynamically remove items from array by passing parameter:
  • 10. Filter multiple values by given condition: Fetch method:returns promises that promiss to return sure or reject If return then output in array object fron json(http) response If single line return
  • 11. OOP
  • 12. import React from 'react'; import {Text, View } from 'react-native'; const App=()=> { return ( <View> <Text>Hello jaipur......!</Text> </View> ); } export default App; npm install expo-cli --global expo init myReactNativeProject cd myReactNativeProject expo start import React from 'react'; import { StyleSheet, Text, View } from 'react- native'; export default function App() { return ( <View> <Text>Hello jaipur......!</Text> </View> ); }
  • 13. Button with click And textBox import React from 'react'; import {Text, View ,Button,TextInput} from 'react-native'; export default function App() { const logIn=()=>{ alert('hello'); } return ( <View style={{width:500,marginLeft:100}}> <Text> Hello jaipur......!</Text> <View style={{width:100,marginLeft:10}}> <TextInput placeholder={'enter user name'}></TextInput> <Button onPress={logIn} title='hitt!!!'/> </View> </View> ); }