Object method to generate object javascript code example
Example 1: js create new object
let bike = { name: 'SuperSport', maker:'Ducati', start: function() { console.log('Starting the engine...'); }};bike.start(); //Output: Starting the engine.../* Adding method stop() later to the object */bike.stop = function() { console.log('Applying Brake...'); }bike.stop(); //Output: Applying Brake...
Example 2: how to make new paruser object
ParseUser parseuser = new ParseUser(); // It's just a simple class object