Professional Documents
Culture Documents
Spending 10 days on the quirks of some topic will not be very useful if you don’t
intend to use them in the coming weeks. Understand what they are and move on: when
the necessity to use them comes you will have the opportunity to go deeper and
learn all the details about them.
===================================================================================
==================================================
Q) what will happen if we load the JS file through the <script> tag and embed the
JS code in the <script> tag as well. For ex - consider below:
<html>
<head>
</head>
<body>
<script type="text/javascript" src ="js/app.js">
console.log("Inside script");
</script>
</body>
</html>
File: js/app.js
console.log("Inside JS file");
When the Javascript is turned off in the web page, <noscript> tage will be executed
and this will be shown in the webpage.
Q)
var description = 'hardware';
function updateProd(){
description = 'software';
}
updateProd();
console.log(description);
A) software
Q)
var description = 'hardware';
function updateProd(){
var description = 'software';
}
updateProd();
console.log(description);
A) software