How can do solve problem of foodDemand?


#1

help me in the topic
how can do solve problem of foodDemand ?


#2

Which section of lesson 3 is your Problem?


#3

yes sir in lesson three


#4

i am strict in lesson no three and section 5,
can you help me?


#5

Yes i can.
Please show me your code so far


#6

// Nicely written function:
var calculate = function (number) {
var val = number * 10;
console.log(val);
};

// Badly written function with syntax errors!

greeting var func{name}(console.log(name)))}


#7

it is original code and i make a code you


#8

// Nicely written function:
var calculate = function (number) {
var val = number * 10;
console.log(val);
};

// Badly written function with syntax errors!
calculate by three(3);
var greeting = function(name){
console.log("name is"+ "" + name);}
var inputgreeting = prompt("Abdul Fatah Soomro" + "" + name):
}


#9

Okay here is the original bad code

greeting var func{name}(console.log(name)))}

And now you should bring the code in the right syntax. Like you try it.
Only use the given values

greeting
var
function
console.log(name)

#10

sir it is not working on this code


#11

it was not my intention to post the working code .

Rather encourage you to think about


#12

This is working:

var greeting = function(name){
console.log(name);
};


#13

sorry sir it's not run to this code.


#14

var greeting = function(name){
console.log(name);
};

greeting("MyName");


#15

thanks sir it's run on this code.


#16

please sir tell me about the "don't repeat yourself" (D.R.Y)


#17

sir please help me in this lesson.

You are a creature of habit. Every week you buy 5 oranges. But orange prices keep changing!

You want to declare a function that calculates the cost of buying 5 oranges.
You then want to calculate the cost of the 5 all together.
Write a function that does this called orangeCost().
It should take a parameter that is the cost of an orange, and multiply it by 5.
It should log the result of the multiplication to the console.
Call the function where oranges each cost 5 dollars.


#18

Did you try it by yourself? Where is your code?


#20

7 posts were split to a new topic: I need help