forked from yogeshswdev/html5_CSS_JavaScript_JQuery_start
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript1.js
More file actions
35 lines (26 loc) · 686 Bytes
/
Copy pathjavascript1.js
File metadata and controls
35 lines (26 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var msg = "Hello javascript";
console.log(msg);
var resultsDiv = document.getElementById("results");
resultsDiv.innerHTML ="<p>This is from javascript</p>";
console.log("msg is " + typeof(msg));
console.log("resultsDiv is " + typeof(resultsDiv));
function showMsg(msg, msgmore) {
if(msgmore){
console.log("showmsg+ " + msg + msgmore);
} else{
console.log("showmsg "+ msg);
}
}
showMsg("some info");
showMsg("some info", "more");
var showIt = function (msg) {
console.log("showit "+ msg);
}
showIt("showit info");
function showItThen(msg, callback){
showIt(msg);
callback();
}
showItThen("showit then", function (msg){
console.log("callback called");
});