pramod talekar

Ranch Hand
+ Follow
since Apr 26, 2010
Merit badge: grant badges
For More
Delhi
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by pramod talekar

I have the below product table :

I want to find out the makers who produce only one product type and more than one model.
The answer is

So far, I have written this query:

It gives the below result:

My question is how to write condition to get result for 1 type only ? as writing having count(type)=1 removes maker D which is required.
Hi Bear,

There's absolutely no difference if I replace window with document and vice versa.
In both cases, when I click on either x or the gray screen, the modal window is closed.
What would be the difference between browser window and html document loaded in the window?
Hello,

I have a query regarding window and document objects based on modal window.
Below is my code

My question is regarding this block
Should this not be 'document.onclick' instead of 'window.onclick'?

Below are definitions :
The window object represents the browser window.
The document object represents the HTML document loaded in that window.

Even though replacing window with document works, I want to know what is right here.
Is it right to click anywhere on browser to close modal?
Yes Bear.
I added 'return greeting' before the end of greeting().

Thanks !
My bad ! Sorry for the trouble Bear and Paul.
Another point is that, if I move getName() outside greetUser(), even then greeting() won't have any return statement, then why does 'Welcome Molly'appear instead of undefined?
Thanks so much Paul for your reply. But I still didn't get why Welcome Molly was not displayed.. what's the logic behind it?
If you are saying that greeting doesn't have a return statement, then why do I see 'welcome Molly' simply by moving getName() outside greetUser()?

I can't agree more with you on accidently fixing the error, that's why asking this question..

Thanks Bear, I have got few questions though..

1.As each function has its own execution context and as getName() has only declarative statements and not expressions, why does the alert statement displays 'undefined' instead of Welcome Molly ?
2. Even if I move the return statement down, it doesn't change the outcome.
3. If I move getName() out of greetUser(), only then it works, but then even greetUser() is a part of greeting() and it can access it's parent's variables viz. time, then what is so different about getName()?
Hi Bear, I'm analyzing someone else's code.

Stephan van Hulst wrote:
What do you need to do to make the function call evaluate to the number 3?



It should have return 3;

Stephan van Hulst wrote:Nope. When does a function call have a return value?


Didn't quite get this.. It returns when the return statement is executed.
If I take the getName() function out of greetuser(), then it returns 'Welcome Molly' otherwise undefined.