Data and Expressions
Any program accesses, manipulates and represents data to the user. Data is available in
different types and forms. This data can be easily decomposed into values. In JavaScript,
data may be represented as a primitive value, object or function.
The data representation at the lowest level is known as primitive data type and includes
null, undefined, number, string and Boolean.
Several built-in objects are defined in JavaScript. These entail the Object object, global
object, Array object, Function object, Boolean object, String object, Math object, Number
object, the RegExp object, Date object, Error object and JSON object.
Any object that is callable is called a function. It may also be referred to as a method if the
function is associated with an object.
Data is produced by using expressions, which is a name given to any code that generates a
value. It may be assigned a value directly or the value may be computed by substituting
and computing an expression composed of operands and operators. It is important to note
that an operand can be another expression as well.
Do'stlaringiz bilan baham: |