Tuesday, May 2, 2017

object literals in Javascript

A JavaScript object literal is like a comma separated name value pairs .

 Ex: var myObject={name:"narendra",height:180};

We can access the properties as myObject.name which gives "narendra"

No comments:

Post a Comment

Call a function in child component from parent component in React

Consider the following parent component class Parent extends React.Component { constructor(props) { super(props);         thi...