JavaScript being an object-based language and in JavaScript almost everything is an object or acts like an object. So lets understand objects in JavaScript from datatypes perspective.
A JavaScript object is just a collection of key value pairs where keys are the properties of objectives and values are their values.
We create objects with the help of curly brackets {} with an optional list of properties. A property is a "key: value" pair, where the key (or property name) is always a string, and value (or property value) can be any data type, like numbers, booleans, strings or complex data type like arrays, functions, and other objects.
var student= {
name: "Majid",
parentage: "Ghulam Rasool",
age: 21,
gender: "Male",
};
Another important datatype in JavaScript is Array. An array is a kind of datatype used for storing multiple values under a single variable. Each element in an array has a numeric position, known as its index, and it may contain data of any data type-numbers, strings, booleans, functions, objects, and even other arrays. Arrays are zero indexed meaning index starts from 0, so that the first array element is arr[0] not arr[1].
var courses= ["BCA", "BSC", "BA", "Commerce"];
На этой странице сайта вы можете посмотреть видео онлайн JavaScript Datatypes: Object and Array Datatypes длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Binary Cave 16 Апрель 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 122 раз и оно понравилось 9 зрителям. Приятного просмотра!