At first I was intimated going into this week I had never worked with coding or javascript prior but I can say it hasn’t been as rough as expected. A JavaScript variable is simply the name of a storage location. There are two types of variables in JavaScript local variable and global variable. There are some rules while declaring a JavaScript variable (also known as identifiers). Name must start with a letter (a to z or A to Z), underscore, or dollar sign. In JavaScript, we can use either var or let keyword to declare variables. For example, var x; let y; Here, x and y are variables. Arithmetic operators in JavaScript, and what they all do are + it adds, – it subtracts, * it multiples, / it divides but this result is a floating-point number, % it divides but this result gives the remainder. The order they are in also matters.
Leave a Reply
You must be logged in to post a comment.