JavaScript Chapter 1 notes // CYBER_SUSHANT

       JavaScript complete Course by Cyber Sushant. Learn JavaScript for free. Cyber Sushant brings you a crash for JavaScript.

    Hello Guys,
Myself Sushant and I am going to teach the complete JavaScript from Scratch. In this course, we are going to learn JavaScript from the beginning to a very advanced level. You have to do one thing that is to follow the course. I design this course for Jr. to advance level persons. If you are a beginner in the programming field.


    you can start from here. Because you can use JavaScript in web development. In the front end we use HTML, CSS and JavaScript as well as we use JavaScript in the backend. So JavaScript is a very important programming language for web development. So my suggestion is To learn JavaScript as your first programing language.
    

 Introduction To Programming


        PROGRAMMING IS A WAY TO TALK TO COMPUTERS. A LANGUAGE LIKE HINDI, ENGLISH, OR BENGALI CAN BE USED BY A HUMAN BUT FOR COMPUTERS. WE NEED STRAIGHT INSTRUCTION

PROGRAMMING IS THE ACT OF CONSTRUCTING A PROGRAMMING, A SET OF PRECIOUS INSTRUCTIONS TELLING A COMPUTER WHAT TO DO 


WHAT IS ECMASCRIPT?

        ECMA SCRIPT IS A STANDARD ON WHICH JAVASCRIPT IS BASED! IT WAS CREATED TO ENSURE THAT DIFFERENT DOCUMENTS ON JAVASCRIPT ARE ACTUALLY TALKING ABOUT THE SAME LANGUAGE


CHAPTER 1


         JUST LIKE WE FOLLOW SOME RULES WHILE SPEAKING ENGLISH, WE HAVE SOME RULES TO FOLLOW WHILE WRITING A JS PROGRAMMING PROGRAM. THE SET OF THESE RULES IS CALLED SYNTAX IN JAVASCRIPT.



 1) WHAT IS A VARIABLE?

            A VARIABLE IS A CONTAINER THAT STORES A VALUE. THIS IS VERY SIMILAR TO THE CONTAINER USED TO STORE RICE, WATER, AND OATS.

            THE VALUE OF A JAVASCRIPT VARIABLE CAN BE CHANGED DURING THE EXECUTION OF A PROGRAMMING


 * * * RULES FOR CHOOSING VARIABLE NAME:-


 1)LETTERS, DIGITS, UNDERSCORE, $SIGN allowed

 

 2)MUST BEGIN WITH A $, - OR  A LETTER  

 

3)JAVASCRIPT RESERVED WORDS CAN NOT BE  USED AS A VARIABLE NAME

 

4)SUSHANT AND Sushant BOTH ARE DIFFERENT (IT IS CASE SENSITIVE).



 2) Var  AND  Let   IN   JAVASCRIPT:-

  1.  VAR IS GLOBALLY SCOPED WHILE LET & CONST ARE BLOCKS SCOPED2
  2.  VAR CAN UPDATE & RE-DECLARE WITHIN ITS SCOPE
  3.  LET CAN BE UPDATED BUT NOT RE-DECLARE
  4.  CONST CAN NEITHER BE UPDATED NOR BE RE-DECLARED
  5.  VAR VARIABLES ARE INITIALISED WITH UNDERLINED WHEREAS LET AND CONST VARIABLES ARE NOT INITIALISED.
  6. CONST MUST BE INITIALISED DURING DECLARING, UNLIKE LET AND VAR.


 3) PRIMITIVE DATA TYPES & OBJECTS:-


1=> PRIMITIVE DATA TYPES ARE A SET OF BASIC DATA TYPES IN JAVASCRIPT 

2=> OBJECTS IS A NON PRIMITIVE DATATYPE IN JAVASCRIPT 



***  THESE ARE THE 7 PRIMITIVE DATATYPE  ***


1)NULL 

 

2)NUMBER

 

3)STRINGS 

 

4)SYMBOL

 

5)UNDERLINED

 

6)BOLLEN

 

7)BIGINT



*** OBJECTS(non-primitive):-

AN OBJECT IN JAVASCRIPT CAN BE CREATED AS FOLLOW:-

 

CONST ITEM ={

          PRICE :"50" 

          KEY NAME: "LET BUILD "

          }

 ****DATA TYPE IN JAVASCRIPT ***

 

let a = 354;                                             //This is number datatype 

 

let b = null;                                            // This is null datatype

 

let c = true;                                             // This is bullen datatype

 

let d = BigInt("56");                               //This is bigint datatype

 

let c = "I am Sushant";                            //This is string datatype

 

let d = "style";                                        //This is style datatype


 

Post a Comment

0 Comments