Created
November 27, 2019 09:41
-
-
Save wackyapps/7b386760b591d027d7c597e670001b2d to your computer and use it in GitHub Desktop.
// source https://jsbin.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
/* | |
Program is set of instructions which executes in memory | |
of the computer | |
variable => container in memory which holds some data | |
for some time | |
*/ | |
var firstName = "Abdul"; | |
firstName = "Waqas"; | |
firstName = 34; | |
// string = "waqas" | 'waqas' | '234' | |
// number = 34 , 34.5 | |
// boolean = true | false; | |
var sum = 2 + 1; | |
var sum2 = parseInt("2") + parseInt("2"); | |
var sum3 = parseFloat("3.2345") + parseInt(2); | |
//document.write(sum); | |
//document.write(sum2); | |
//document.write(sum3); | |
if(sum == 4){ | |
//document.write("True"); | |
}else{ | |
//document.write("False"); | |
} | |
var isSunnyDay = true; | |
isSunnyDay = false; | |
isSunnyDay = 1; | |
switch(isSunnyDay){ | |
case true: | |
document.write("Yes, today is a sunny day"); | |
break; | |
case false: | |
document.write("No, today is a cloudy day"); | |
break; | |
case 1: | |
document.write("At the moment it is nigt"); | |
break; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">/* | |
Program is set of instructions which executes in memory | |
of the computer | |
variable => container in memory which holds some data | |
for some time | |
*/ | |
var firstName = "Abdul"; | |
firstName = "Waqas"; | |
firstName = 34; | |
// string = "waqas" | 'waqas' | '234' | |
// number = 34 , 34.5 | |
// boolean = true | false; | |
var sum = 2 + 1; | |
var sum2 = parseInt("2") + parseInt("2"); | |
var sum3 = parseFloat("3.2345") + parseInt(2); | |
//document.write(sum); | |
//document.write(sum2); | |
//document.write(sum3); | |
if(sum == 4){ | |
//document.write("True"); | |
}else{ | |
//document.write("False"); | |
} | |
var isSunnyDay = true; | |
isSunnyDay = false; | |
isSunnyDay = 1; | |
switch(isSunnyDay){ | |
case true: | |
document.write("Yes, today is a sunny day"); | |
break; | |
case false: | |
document.write("No, today is a cloudy day"); | |
break; | |
case 1: | |
document.write("At the moment it is nigt"); | |
break; | |
} | |
</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Program is set of instructions which executes in memory | |
of the computer | |
variable => container in memory which holds some data | |
for some time | |
*/ | |
var firstName = "Abdul"; | |
firstName = "Waqas"; | |
firstName = 34; | |
// string = "waqas" | 'waqas' | '234' | |
// number = 34 , 34.5 | |
// boolean = true | false; | |
var sum = 2 + 1; | |
var sum2 = parseInt("2") + parseInt("2"); | |
var sum3 = parseFloat("3.2345") + parseInt(2); | |
//document.write(sum); | |
//document.write(sum2); | |
//document.write(sum3); | |
if(sum == 4){ | |
//document.write("True"); | |
}else{ | |
//document.write("False"); | |
} | |
var isSunnyDay = true; | |
isSunnyDay = false; | |
isSunnyDay = 1; | |
switch(isSunnyDay){ | |
case true: | |
document.write("Yes, today is a sunny day"); | |
break; | |
case false: | |
document.write("No, today is a cloudy day"); | |
break; | |
case 1: | |
document.write("At the moment it is nigt"); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment