Objects in Java Script
Object is the way of storing group of data in key-value pairs. Object is denoted by symbol { }.
here it is difficult to understand which value is first and last name, perhaps by guessing. What if array values are interchanged
What is a Function
A function, in simple terms, is a (named) group of code that can be invoked. In other words, a function is a way to group together some code, give this group a name, and later invoke the code using the given name.
<script>
function msg(fname, lname){ document.write("Hellow"+ fname+ ""+ lname+"<br>"); }
msg("Code","Guruva"); msg("ramesh","babu");
</script>
JavaScript Classes
In programming, classes are used a "blue print" for modeling real-world items in code. In JavaScript, the syntax for creating a class could be as simple as:
object with 'Class Constructors'
Whilst I was creating a weather app with Javascript, I was confused about what a class constructor does. Therefore, I decided to research about it and help others to understand how to work with them. A class constructor is nothing more than a way to create an object in ES6 so is a new way but incredibly useful to create and build applications.