+ 1
Objects in JS
Who knows how to make an object in Javascript
4 Respostas
+ 3
JavaScript Objects
https://www.w3schools.com/js/js_objects.asp
+ 2
let obj = {"a":1}
and I am sure you could have found it out if you did your own research.
+ 2
Hey Kelechi Egwuatu
I’m not sure where this was covered in the courses offered here. But Objects are created using the {} syntax, with each key-value pair separated by a comma. Like in Lisa's example:
let obj = {"a": 1};
Here's what's happening:
let is a keyword that declares a variable. In this case, we're creating a variable called obj.
obj is the name of the variable.
= is the assignment operator, which assigns a value to the variable.
{"a": 1} is the value being assigned to the variable.
I’d like to encourage you to keep asking questions. But also take Lisa's advice, researching is a good skill to have. Happy coding!
0
function nada(name,){
name = name}