Javascript_Notes-3
Javascript_Notes-3
4)type's js:-->
a)inline js:-->define js effect for single html element
b)internal js:-->can be used by current web page
<script type="text/javascript">
code goes here
</script>
8)javascript output:-->
a)innerHTML:-->
b)innerText:-->
c)document.write():-->
d)window.alert():-->
e)console.log():-->
f)window.print():-->
a)Why to use:
I)with function we can reuse the
II)we can write code that can be used many times
III)We can use same code for diffrent arguments and get different result
19)Javascript objects:-->objects are variable too. but can contains many values
{name:'Arun',age:'23'}
Object comes in name and value pair also called key and value
a)Using object literal:-->an object literal is a list name and value pairs inside
{}
I)How to access value for key from object
objectName.keyname
}
I)Expression 1:-->it is executed one time before executing for loop code
II)Expression 2 :-->defines the condition for executing for loop block code
III)Expression 3:-->this will execute every time after last loop execution till end
of for loop