- Where Developers Learn, Share, & Build Careers


I'm trying to work this function properly in JavaScript, okay it's working properly I can down console.log (work ("gallon water is extracted from carpet.")); I can not be removed from the "gallon water carpet." To show in the same line of code.

  // global variable var water gallon = 40 var function = function (total) {var water = 0; While (water and lieutenant; water gallon) {console.log ("carpet company was called to remove" + water + "gallons of water.) Water + = 4;}; Return Water Galon;} Console.log ( The work ("The gallon of water is extracted from the carpet."));   

So what I am doing using the answers I have received has helped me because of the global variable I need to use I, my story will change by changing the global variable.

  var total = 40 var = Function (total) {var water = 0; while (water and lift; total) {console.log ("carpet company was called to" + water + "to extract from the water jum.) Water + = 4 ; }; Return water; } Console.log (work (total) + "The water of the gallon is extracted from the carpet.");   

Id wants to thank you again. I still have a boolean function, an array for a loop function, and a process left. So by using it I should be able to understand how to make the next part of my assignment.

work corresponds to the formal parameter for the logic function Total , which is never printed or otherwise used if you want to print it in the console, then, OK, you have to print it in the console.

It is not clear what you are trying to do, but it is a possibility:

  high water gallon = 40; Var function = function () {var water = 0; While (water and lieutenant; water gallon) {console.log ("carpet company was called to remove" + water + "water gallons.) Water + = 4;}; return water;} Console.log (work () + "The gallon of water from the carpet has been extracted.");   

If you actually string the argument of work Use the console.log (total) on that function, then inside console inside parameter. Keep me in my name Remember to.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -