GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Basic-To-Advanced-JavaScript/If_Else/app.js at main · MaazWebDev/Basic-To-Advanced-JavaScript

Expand file tree

/

app.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
149 lines (131 loc) · 3.21 KB
/

app.js

Copy path

File metadata and controls

149 lines (131 loc) · 3.21 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// if(condition){
// result
// }
// var age = +prompt("write your age")
// if (age >= 18){
// console.log("admission hogaya");
// document.write("admission hogaya")
// }
// else{
// console.log("admission nhi hua")
// document.write("<h1>admission nhi hogaya</h1>")
// }
// if html && css quiz number > 150 so you are eligible else not
// var html = +prompt("write your html numbers")
// var css = +prompt("write your css numbers")
// var result = html + css
// console.log(result);
// if(result >=150){
// console.log("pass");
// }
// else{
// console.log("fail");
// }
// Write a JavaScript program that accept two integers and
// display the larger. Also show if the two integers are equal.
// var num1 = +prompt("enter your 1st integer");
// var num2 = +prompt("enter your 2nd integer");
// if(num1 > num2){
// console.log(num1 + " is greater then " + num2);
// }
// else{
// console.log(num2 + " is greater then " + num1);
// }
// Write a program that takes input a number from user &
// state whether the number is positive, negative or zero.
// var num = +prompt("Enter Your Number")
// if (num > 0){
// console.log("positive");
// }
// else if (num === 0){
// console.log("neutral");
// }
// else{
// console.log("negative");
// }
// var num1 = +prompt("enter 1st number")
// var num2 = +prompt("enter 2nd number")
// var operator = prompt("enter your operator", '+ - * /')
// var result;
// if(operator == "+"){
// result = num1 + num2
// console.log(result);
// }else if (operator == "-"){
// result = num1 - num2
// console.log(result);
// }else if (operator == "*"){
// result = num1 * num2
// console.log(result);
// }else if (operator == "/"){
// result = num1 / num2
// console.log(result);
// }else{
// alert("your operator does not exist")
// }
// Comparison operators
//==
//===
//!=
//!==
//>
//<
// &&
// ||
var number = 20
// if (number == '20'){
// console.log("equal");
// }
// else{
// console.log("not equal");
// }
if (number != 30) {
console.log(" equal")
}
else {
console.log("notequal");
}
// if & else if
// var age = +prompt("enter age")
// var clas = +prompt("enter time")
// if (age > 8 && clas < 3 ) {
// alert("Come to our school!");
// }
// else {
// alert("dont Come to our school!");
// }
// var weight = +prompt("enter weight")
// var time = +prompt("enter time")
// if (weight > 300 || time < 6) {
// alert("Come to our tryout!");
// }
// else {
// alert("Come to our cookout!");
// }
// var password = "smit";
// var userinput = prompt("type yor input")
// console.log(userinput);
// if (password == userinput){
// console.log("password is correct");
// }
// else{
// console.log("password is not correct");
// }
// nested if else
// var dinner = prompt("what do you want in dinner")
// console.log(dinner);
if (dinner == 'biryani' || dinner == 'tikka' || dinner == 'pizza') {
console.log("it is Available")
// nested
if (dinner == "biryani") {
alert("biryani price : 300")
}
else if (dinner == "tikka"){
alert("tikka price : 500")
}
else{
alert("pizza price : 1000")
}
}
else {
console.log("it is not availabe")
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.