Skip to main content
added something funny I found in OP's code
Source Link
SirPython
  • 13.5k
  • 3
  • 38
  • 93
if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a falsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you just moved ++wait.counter to a line of it's own.

++wait.counter;
console.log ("count= " + wait.counter + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.


P.S.

fixed = true;
break;
if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a falsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you just moved ++wait.counter to a line of it's own.

++wait.counter;
console.log ("count= " + wait.counter + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.

if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a falsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you just moved ++wait.counter to a line of it's own.

++wait.counter;
console.log ("count= " + wait.counter + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.


P.S.

fixed = true;
break;
added 1 character in body
Source Link
SirPython
  • 13.5k
  • 3
  • 38
  • 93
if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a falsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you just moved ++wait.counter to a line of it's own.

++wait.countercounter;
console.log ("count= " + wait.counter + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.

if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a falsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you just moved ++wait.counter to a line of it's own.

++wait.counter
console.log ("count= " + wait.counter + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.

if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a falsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you just moved ++wait.counter to a line of it's own.

++wait.counter;
console.log ("count= " + wait.counter + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.

Thanks IsmaelMiguel
Source Link
SirPython
  • 13.5k
  • 3
  • 38
  • 93
if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a false-likefalsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you put the ()s around thejust moved ++++wait.counter also:to a line of it's own.

++wait.counter
console.log ("count= " + (++waitwait.counter) + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.

if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a false-like value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you put the ()s around the ++ also:

console.log ("count= " + (++wait.counter) + "  queryComplete= " + queryComplete);

Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.

if (typeof wait.counter == 'undefined' ) {

Checking if something is undefined by checking it's type is unnecessary. Since undefined is a falsey value, simply putting the thing you'd like to check in a conditional will do the trick:

if( !wait.counter ) {

console.log ("count= " + ++(wait.counter) + "  queryComplete= " + queryComplete);

All those + signs between "count= " and " queryComplete= " are a little confusing. It seems like you tried to make it more readable by putting ()s around wait.counter, but it would be more readable if you just moved ++wait.counter to a line of it's own.

++wait.counter
console.log ("count= " + wait.counter + "  queryComplete= " + queryComplete);

Thanks to IsmaelMiguel for recommending to move the ++wait.counter out of console.log all together.


Add some documentation to your functions to describe what they are doing, what they need, why they need it, and what it is returning.


This is all I can review, as I am not familiar with SQL.

Source Link
SirPython
  • 13.5k
  • 3
  • 38
  • 93
Loading