console.log();
In Javascript, it is a good practice to end all lines of code with
;
//
- Comments out a single line
> ex)//Print 5 to console console.log(5);
- Can also be used to add comment at the end of a line of code
> ex)console.log(5); //Prints 5 to console
/* Comments */
- Comments out multiple lines
> ex)/* This is an example of commenting out multiple lines */
- Can also be used to add comment within a line of code
> ex)console.log(/* Print this value */ 5);
In Javascript, there are 7 fundamental data types:
*The first 6 of the above are primitive data types
*The Object data type is more complex
Objects, including instances of data types, in Javascript have unique properties and methods that can be called on to implement various functions
properties & methods of an object are called with the .
operator
Properties
Properties are unique features of an object
- properties are called with the following syntax:
obejct/instance name +.
+ property name- ex)
'hello'.length
Here,.length
is a property of the string instance'hello'
> calling'hello'.length
withconsole.log()
will print the length of the string 'hello' to the console
Methods
Methods are unique actions you can perform on an object
- methods are called with the following syntax:
obejct/instance name +.
+ property name +()
- ex)
console.log()
Here,.log()
is a method of Javascript's built-in obejctconsole
- ex)
'hello'.toUpperCase()
Here,.toUpperCase()
is a method for the string object instance 'hello'
Javascript provides objects 'built-in' to the language, like Math
obejct, which are a collection of properties and methods that can be accessed to perform tasks
Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. 먹튀폴리스
This article was written by a real thinking writer without a doubt. I agree many of the with the solid points made by the writer. I’ll be back day in and day for further new updates. 먹튀검증
Thanks for another wonderful post. Where else could anybody get that type of info in such an ideal way of writing? A-esthetic.co.uk
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Nomad Yachting
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. F95zone