Skip to main content

variable in javascript

 just like we follow some rule while speaking english (grammer rule), we have some rull to follow while  writting javascript programming. the set of these rules is called syntax in javascript


what is a variable ?

A variable is a container that store  a value this is very similar to the container used to store like chini, chiyapatti, kitnashak aushdhi, some electronic gadgate etc (treat this as a analogy)

the value of a javascript can be changed during executing of a program

                var a = 7;
                  let a = 7;
7    =  litral 
a    =  identifier 
=   =  assignment operator 

Rules for choosing varible name 

1.  Letters, digits, underscores & $ is allowed
2.  must begin with a $,_ or a letter
3.  javascript reserved word cannot be used as varible name
4.  RoShay & roshay are different variable (case sensetive)




Comments

Post a Comment

Popular posts from this blog

HTML, CSS, JS and how website work

 Basic Requirments to build a website HTML                    Must/Structure/Skalaton CSS                         Design JAVASCRIPT     Logic/Brain How Website Work Client request for the website  server returns the response Role of HTML - HTML stands for Hyper Text Markup Language - it is basically a standard markup language for given a statics skeleton to web application and website - its a well standarized system  ROle of CSS -Cascading Style Sheets which is known as CSS is a style sheet language that use to handle the presenatation of the web pages containing HTML - it makes our websites beautiful and modern looking Role of JS - JavaScript which is known as js, is a highly level dynamic interprated programming language. - it allows client-side scripting to create completely dynamic web application and websites. 

introduction to programming

  introduction to programming. programming is a way to talk to computer a language like nepali, hindi, english and spanish etc. can be used to talk with human but for computer we need strainghtforward instruction programming is the act of constructing a program, a set of precise instruction telling a computer what to do. What is Ecmascript ? Ecmascript is a standard on which javascript is based, it was created to ensure that different documents on javascript or actually talking about the same language.  Javascript & Ecmascript can almost always be used in the interchangly javascript is very literal in what it allows. how to execute Javascript ? there are lot of the way to execute javascript. But we will learn some common way to execute javascript. javascript can be execute right inside one's browesers you can open the javascript it console and start writting javascript there. Another way to execute javascript is a runtime like node.js which can be installed and used to run...

Topics to cover in fundamental of computer

 In a "Fundamentals of Computer" course or discussion, you should aim to cover topics that provide a strong foundational understanding of how computers work. Here’s a comprehensive list of topics you might include: 1. Introduction to Computers History of Computers Generations of Computers Classification of Computers (e.g., analog, digital, hybrid) Applications of Computers in different fields 2. Basic Components of a Computer Input Devices (e.g., keyboard, mouse) Output Devices (e.g., monitor, printer) Central Processing Unit (CPU) Memory Units (RAM, ROM, Cache) Storage Devices (Hard Drives, SSDs, Optical Disks) 3. Hardware and Software Difference between Hardware and Software Types of Software (System, Application, Utility, Firmware) Operating Systems: Roles and Examples Computer Architecture Basics (Von Neumann Architecture) 4. Data Representation Number Systems (Binary, Decimal, Octal, Hexadecimal) Data Conversion between Number Systems ASCII and Unicode Standards Represen...