Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted == to === #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/lab/exp1/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp10/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp2/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp3/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp4/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp5/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp6/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp7/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -55,10 +55,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp8/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -54,10 +54,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
12 changes: 6 additions & 6 deletions src/lab/exp9/quizconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ var incorrect=null
for (q=1;q<=totalquestions;q++){
var thequestion=eval("document.myquiz.question"+q)
for (c=0;c<thequestion.length;c++){
if (thequestion[c].checked==true)
if (thequestion[c].checked===true)
actualchoices[q]=thequestion[c].value
}

if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
if (incorrect==null)
if (incorrect===null)
incorrect=q
else
incorrect+="/"+q
}
}

if (incorrect==null)
if (incorrect===null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
if (document.cookie==='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="results.htm"
Expand All @@ -53,10 +53,10 @@ win2.document.write('<center><h3>Solution to Quiz</h3></center>')
win2.document.write('<center><font face="Arial">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
if (i===incorrect[temp])
wrong=1
}
if (wrong==1){
if (wrong===1){
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
wrong=0
}
Expand Down
Loading