Objects, Properties , Functions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Objects, Properties , Functions

Having difficulties in understanding objects, properties,etc.. can some please take me through it.. I mean,the first two lessons in JavaScript intermediate 🙂

11th Jul 2023, 6:10 PM
Mr Blank
Mr Blank - avatar
2 Answers
+ 1
Take this question as an example, there are several contents of different types, which the asker name, question title and question message. So its data is an object, like: var question = { asker : "Mr Blank", title : "Object, Property Function", } Note that - Each item is separated with comma - We use colon in each item, putting property name before colon and property content after colon. When we want to use the content, we access by variable name dot property name, for example: console.log(question.asker); // Mr. Blank console.log(question.title); // Object, Property, Function
13th Jul 2023, 5:04 AM
Gordon
Gordon - avatar