IDENTIFIERS =========== methods, variables, classes etc. ==> within the program, to name any entity like: variables, methods, classes, functions, objects etc. we can use "identifiers" Rules for the Identifiers: ========================== 1) Should include: Alphabets ==> Upper case and/or Lower case Digits ==> 0 to 9 Special Characters: Underscore Dollar sign ex: deposit_12, deposit$21 2) Identifier never start with digit. ex: 9abc = 12; 3) Identifier never be the keyword. 4) Never include with special characters like: space, dot, <, >, ?/"{ 5) No limit in identifier length. Note: When we need to define identifiers, the length is as per our standards of working project. ============================================= Dynamically Typed Language: =========================== High-level Programming languages: classified into three types: 1) Statically Typed 2) Strongly Typed 3) Dynamically Typed 1) Statically Typed =================== ==> C, C++ ==> Statically typed programming languages based the type of the value the assigned value can be automatically modified. #include void main() { int a; // variable declaration a = 123; a = 1.23f; printf("%d\n",a); printf("%f\n",a); } 2) Strongly Typed ================== ==> we can't access the variable without initialization. ==> we can define the variable with values based on the ranking of the primitive datatypes. byte << short << int << long << float << double class Variables{ public static void main(String[] args) { int a; a = 123; a = 1.23f; System.out.println(a); } } 3) Dynamically Typed ===================== Ex: JavaScript, Python ==> For dynamically typed languages, the variable name never be preceded with its type. Because, the JS can detect its type based on the value which we have assigned. ================================================= VARIABLES ========= ==> we have three keywords to define variables: 1) var keyword 2) let keyword 3) const keyword Note: ==== without these keywords also, we can define variables. But those variable can automatically detect as "var" type. Hoisting: ========= is the process to extend the scope of property/variable/function to above the definition. Note: ==== We can't observe the hoisting property on the variables which are without any keywords like: var/let/const. 1) var keyword ============== Syntax: var identifier = value; // variable declaration and initialization 1) the default value for the variable with var type ==> "undefined". 2) the variable with var type can be hoisted. 3) the variable with var type can be allowed to define within the block and allowed to access within the same block and even in outside block also.