A variable in java script is a location for date storage. There are two types of variables that are renowned in java script which are global variables and local variables. In javascript, a variable is created when you combine the word let with the data that you are trying to decipher. In order to initialize a variable in javascript, one must first use the type followed by the variable, an equal sign and lastly the expression. the difference between initialization and declaration in variables is that declaration declares how the creation of variables is met while initialization helps to initiate the values use of variables. When naming a variable in javascript one must start off the sequence with a lowercase letter and then followed by capitalizing the first letter of the following words. When using Java script, the arithmetic operators are distinguished through numerical values such as variables or literals. They are returned as a single numerical value but the main symbols used are the subtraction, division, multiplication and addition symbols. These arithmetic operators help to create a sequence/formula on javascript. Concatenation in Javascript is the operation to join more than two strings to give a one finalized result. The two concatenation operators used is javascript are the + and the +=. Lastly, javascript used the prompt () as a way to prompt a user for a response. This helps to get the users input on the code.
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.
Hi Cassidy! JavaScript and coding can be quite confusing, I like the way how you explained it quite simply. How Javascript is basically a location for data storage, Then you explained how variables are written. You covered all the main parts! Great Job!