Mobile Development- Using React Native - Lecture 7
Lecture Outcome:
At the end of the lecture, students will be able to know about
- Recap
- run js file lecture7Test.js
- run switchPractice.js
- js syntax is different
### Recap `programming basics p3,p4, -> data-types, conditional operators,` number, string, object, boolean, opertors, if , if else, ifelseif ` if(x===3) { }else if(x===4){ }else if (x===10) { }else { } ` <!-- WHEN TO USE IF and WHEN NOT USE IT --> <!-- - when you have more than 5 checks DONT USE IF ELSE - e.g. CAPITAL LETTER, number, special character, small letter, total length 8, EMPTY PASSWORD, not have white spacce --> <!-- WE HAVE ANOTHER CONDITIONAL HELPER CALLED SWITCH/WHEN -->
lecture7Test.js
const x = 202020 if(x === 10){ console.log("==========="); console.log(x); console.log("==========="); }else if(x===22){ console.log("==========="); console.log(x); console.log("==========="); }else if(x===33){ console.log("==========="); console.log(x); console.log("==========="); }else { console.log("==========="); console.log('last else block chla'); console.log("==========="); }switchPractice.jsconst x = 89898 switch(x){ case 33: { console.log("33") break } case 22: { console.log("22") break } case 11: { console.log("11") break } default: console.log("defualt") } // SWITHC MULTI CASE ASSIGNMENT ISSUE const x = 33 switch(x){ case 33,22,11: { console.log("jpafjafjj") } default: console.log("defualt") } // swith k andr multiple case combinings // for same out put!# TALK -> when you are learning something -> teacher agnostic -> forget what you know already -> e.g. if glass if full and you poure the water will out flow -> proud ( is a sin ) so dont be like that -> TECH PEOPEL -> JAVA -> KOTLIN -> SWIFT -> C # -> DOT NET -> python SYNTEX DIFFER FROM EACH OTHER, JAVASCRIPT ( IS DIFFERENT )
0 comments:
Post a Comment