Chapter 5 of the web development course focuses on JavaScript variables, detailing the rules for naming identifiers, including that names must start with a letter and are case sensitive. It discusses the assignment operator, data types, and the implications of re-declaring variables, emphasizing that re-declaration does not affect the variable's value. Additionally, it highlights the impact of using quotes around numbers in arithmetic operations, which can lead to string concatenation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views16 pages
Cis488 Ch5 Js
Chapter 5 of the web development course focuses on JavaScript variables, detailing the rules for naming identifiers, including that names must start with a letter and are case sensitive. It discusses the assignment operator, data types, and the implications of re-declaring variables, emphasizing that re-declaration does not affect the variable's value. Additionally, it highlights the impact of using quotes around numbers in arithmetic operations, which can lead to string concatenation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16
WEB DEVELOPMENT
(JavaScript) CIS488 CHAPTER 5 JAVASCRIPT VARIABLES LECTURE BY ASSOC. PROF. DR. SAHAR EBADINEZHAD Variables JavaScript Identifiers
Names can contain letters, digits, underscores, and dollar signs.
Names must begin with a letter Names can also begin with $ and _ (but we will not use it in this tutorial) Names are case sensitive (y and Y are different variables) Reserved words (like JavaScript keywords) cannot be used as names The Assignment Operator JavaScript Data Types Declaring (Creating) JavaScript Variables One Statement, Many Variables Value = undefined Re-Declaring JavaScript Variables
If you re-declare a JavaScript variable, it will not lose its value.
JavaScript Arithmetic If you put a number in quotes, the rest of the numbers will be treated as strings, and concatenated. JavaScript Dollar Sign $ JavaScript Underscore (_)