Basics of JavaScript | Technical Teacher

About Javascript?
 
Javascript was developed by Brendan Eich in 1995.
It can be used to create dynamic page for client-side.
It can also used two types of comments like single-line comment(// – It can be used after or before the the statement) and multi-line comment(/*……………………………….*/).
Code in javascript written inside  <script>……</script> tag.
We can write javascript code  in 3 places in Html coding i.e. between the head tag, between the head tag and external javascript file(.js file).
Simple Example:-
<html>
<head>
<title>javascript</title>
</head>
<body>
<button onclick=”alert(‘yourtechnicalteacher’)”>Click Button</button>
  <script type =”text/javascript”>
  alert(“page is loading”);
  <script>
</body>
</html>
Output:-
 
 
To find errors in javascript by using chrome console:-
Take an example and do mistake in previous example like-
Wrong Example:-here we can remove a letter(‘l’) form alert().
<html>
<head>
<title>javascript</title>
</head>
<body>
<button onclick=”alert(‘yourtechnicalteacher’)”>Click Button</button>
  <script type =”text/javascript”>
  alert(“page is loading”);
  <script>
</body>
</html>
Output:-