Skip to main content

Posts

Showing posts from February, 2023

JSX Styling with CSS

CSS Styling in JSX .... We are use css in JSX many ways.  1 . First of all we use inline css like inline HTML. 2 . second we direct import css file in js file. 3 . If we are make style file in public folder then we use link tag root index.html file 4 .  Last but not the list.. we use css module as a variable.. import './App.css' ; import style from './style.module.css' ; function App () {   return (     < div className = "App" >       < h1 style = {{color: "green" , fontSize: "4rem" }} >Wellcom</ h1 >     </ div >   ); } export default App ;

JavaScript in operator

JavaScript  in  operator....  =>  JavaScript  in   operator. It's use to identifyee any value include in this Object or Array. When use in for Object than we are use key before in  operator and use after this Object name. => When use in   for Array. Than use index number before in operator and after Array name.                 const myObject = {     apple: 2 ,     banana: 3 ,   }   console . log ( "apple" in myObject );   const myArrey = [ 'apple' , 'Banana' , 'Mangow' ];   console . log ( 1 in myArrey );