Salam tahir bhai javascript is new for me
plz tell how eval function is work?
I know about little bit &
how can we write our own eval() function in javascript
& plz kindly send any javascript reference link
eval function
6 posts • Page 1 of 1
eval functionSalam tahir bhai javascript is new for me
plz tell how eval function is work? I know about little bit & how can we write our own eval() function in javascript & plz kindly send any javascript reference link
Javascript Eval functionThe built-in function eval takes a string as its argument. The string can be is any string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects.
If the argument represents an expression, eval evaluates the expression. If the argument represents one or more JavaScript statements, eval performs the statements. This function is useful for evaluating a string representing an arithmetic expression. For example, input from a form element is always a string, but you often want to convert it to a numerical value. Example In this example we use eval() on some strings and see what it returns:
The output of the code above will be:
Re: eval functionok I understand but tell me how can I write my own eval function
I have an idea but yeh samajh nahi a raha hai ke javascript mein kon se function use karo bcoz I'm new in javascript plz help me
Re: eval functionw.sallam shariq bhai...App ka question asal may hamein samajh nahi aa raha k app kehna kia chahtay hain....ap apna eval funtion kesay declare karna chahtay hain please mention a detail note about it ok...anyways attachment may aik eval funtion use kia gaya hay and it is a very very basic sort of example app check karein shayad kuch help mil jaye iss say...and most of all apni problems ham say share karnay may koi hasitation feel nahi karna okkzz....With regards
ADIL IBRAHIM You do not have the required permissions to view the files attached to this post.
Re: eval functionmujhe eval ka function use kerna to samajh a gaya hai balke mai ne use bhi ker ke dekh lia hai ap mujhe yeh batao ke mai javascript use kerte hue ek apna function write kerna chah raha hon jis ko mai yeh string do
to wo mujhe is ka result return kare 4.
Re: eval functionHello!
The thing you are talking about is might not be possible as you will not be able to parse each command. However you can write a simple function with basic operations that you will be able to perform after parsing the string, but this also will be not a piece of cake, you might have to implement low level programming concepts.
6 posts • Page 1 of 1
Return to Java Script / VB Script Who is onlineUsers browsing this forum: No registered users and 0 guests |
|