Mobile Development- Using React Native - Lecture 6
Lecture Outcome:
At the end of the lecture, students will be able to know about
BASIC DATA TYPE
Programming basics
# BASIC DATA TYPE TALK ## DataTypes ## language builtins ( imperative data types ) number = integer/number letter = 's' char conditonal = boolean {0|1} {false|true} # non-imperative data type ( asi types jo kisi ko b apna ma convert kr la ) words = "strings" object = {} var x = {"value1":3, "value2": 2} ## javascript hates types #javaScript is typeAgnostic <!-- //in other langaugee --> const string x = "value"; <!-- in JS --> x = "value" x = 33 x = 3.3 x = true x = false <!-- // in react we have prop-types package to handle type issues in JS --> <!-- if you are going towards heavy math calculations do not use JS -> TS -->
# Programming basics p4 # conditionals <!-- symbolic language/operators --> = "barabr j, equals to" == "shallow comparisons" ❌ '3' == 3 === "strtict compare" ✅ ! "NOT" <!-- ya jis k sath lgta h uski qeemat ulat daita h e.g x = true console.log(!x) => FALSE --> > "is Larger" < "is smaller" !== "not equals" !> "not larger/greater" !< "not smaller" <!-- x !> 30 --> <!-- car === corrola --> <!-- BATMAN !> AquaMan --> <!-- var doll = "elsa" --> # conditionals - ifis - switchers - (C-OP === "conditional operator" ?: ) - C-OP door ka cousins ( && , || ) # ifis if(x === 3) {} <!-- for damange control we have ELSE HANDLERS --> if(x === 3) { }else{ } <!-- if Slip-Ups --> if(x === 3) { } if (x ====4 ) { } if( x !== 3) { }testTheories.js// var x = 50 // if(x === 30) { // console.log("yes its 30"); // }else { // console.log("ELSE BLOCK CHLA H"); // } // if slipups var x = 50 if (x === 50) { console.log(x); x = 40 } if (x !== 50) { console.log(x); }testTypes.jsx = "hie" console.log("========================="); console.log(x); console.log("========================="); x = 33 console.log("========================="); console.log(x); console.log("========================="); x = 3.3 console.log("========================="); console.log(x); console.log("========================="); x= 's' console.log("========================="); console.log(x); console.log("========================="); x = false console.log("========================="); console.log(x); console.log(
0 comments:
Post a Comment