raziqijr
Members-
Posts
15 -
Joined
-
Last visited
raziqijr's Achievements
Newbie (1/14)
0
Reputation
-
I Am Confused With Javascript Function Scope
raziqijr replied to raziqijr's topic in Modern Javascript: Develop and Design
another question is that what is the difference between property and variable , is not property aslo a variable ? can u pls define prototype chain and scope chain a bit more so that i can understand it easily -
I Am Confused With Javascript Function Scope
raziqijr replied to raziqijr's topic in Modern Javascript: Develop and Design
.. ... -
I Am Confused With Javascript Function Scope
raziqijr replied to raziqijr's topic in Modern Javascript: Develop and Design
when using functions inside functions the variable names are resolved from scope chain and when objects are inside another object then the property names are resolved through prototype chain , so prototype chain and scope chain are different because scope chain is used for functions and prototype chain is used for objects that why we should use keyword this inside function to refer to object the method is inside , am i correct here . -
I Am Confused With Javascript Function Scope
raziqijr replied to raziqijr's topic in Modern Javascript: Develop and Design
thank you very much HarleySan. i ask these question to better understand the inner-workings of JS, is it good to understand the inner-working of JS or should we just follow what is written in books, does this effect our learning things -
I Am Confused With Javascript Function Scope
raziqijr replied to raziqijr's topic in Modern Javascript: Develop and Design
i am thinking if function inside another function can access outer functions variable then why it cant access the obj object property name then. -
var obj { var name: 'some value', mtd: function () { alert(name); } } obj.mtd(); The mtd function defined in obj has no defined parameters, but when called the this reference and argument list are passed to the function. Is the name property of obj also present in the mtd function so it can be used in the alert() call as above, or does the mtd function have nothing to do with the property named name? if lerry ullman answer my question than it would be so great
-
ok now read it carefully The foreach loop will access each item in the $very_bad array one at a time, assigning each item to $v. Within the loop, the stripos( ) function will check if the item is in the string provided to this function as $value. The stripos( ) function performs a caseinsensitive search (so it would match bcc:, Bcc:, bCC:, etc.). The function returns a Boolean TRUE if the needle is found in the haystack (e.g., looking for occurrences of $v in $value). The conditional therefore says that if that function’s results do not equal FALSE (i.e., $v was not found in $value), return an empty string. the bold red text above should really have said (i.e , $v was found in $value) not (i.e., $v was not found in $value) what do u say?
-
this is the the page 405 chapter 13 The foreach loop will access each item in the $very_bad array one at a time, assigning each item to $v. Within the loop, the stripos( ) function will check if the item is in the string provided to this function as $value. The stripos( ) function performs a caseinsensitive search (so it would match bcc:, Bcc:, bCC:, etc.). The function returns a Boolean TRUE if the needle is found in the haystack (e.g., looking for occurrences of $v in $value). The conditional therefore says that if that function’s results do not equal FALSE (i.e., $v was not found in $value), return an empty string. in above page i bold the text which should really have said (i.e $v was found in $value) am i right pls correct me if i am wrong.