Create Initialize Integer String Boolean Float Variables in React Native

Variables is the base of every computer programming language. Variables is used to store, manipulate various types of information encoded in a particular format, They also work like a container which can hold any value according to their bucket holder. So in this tutorial we would going to create a react native app and Create Initialize Integer String Boolean Float Variables in React Native in React Native android iOS application. So let’s get started 🙂 .

Create Initialize Integer String Boolean Float Variables

Contents in this project Create Initialize Integer String Boolean Float Variables in React Native App Code :

React Native has the same the declaration syntax as JavaScript. So using var we could declare variable and initialize value to it.

1. We would create Integer variable using var. All we have to do it assign Integer value to it. See the below example.

  • A stores value 5.
  • B stores value 6.
  • Z stores the value of A + B which is 11.

2. Storing String Value in var. React native variable can hold any type of value.

3. Storing Float type value in var.

4. Create Boolean type of value using var.

 

Leave a Reply

Your email address will not be published. Required fields are marked *