Busy. Please wait.

show password
Forgot Password?

Don't have an account?  Sign up 

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
We do not share your email address with others. It is only used to allow you to reset your password. For details read our Privacy Policy and Terms of Service.

Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.

Remove ads
Don't know
remaining cards
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
restart all cards

Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

JavaScript 1

Describe escape() function Function that takes a string and encodes the special characters
Desc. unescape() function Returns converted special chars to regular
Desc. split(p1, p2) If no param returns the whole string p1-Str to split p2-Num of splits to return
Timed operations SetTimeOut clearTimeOut var t=setTimeOut("javascript stmt", millisec); java stmt can nbe function call or as statement that executes
How to clear a timed function clearTimeOut(variable)- cancels the setTimeOut
getElementById("Id").innerHTML Inserts text or script to right of '=' where item flagged with 'Id'
Define Cookie How to assign cookie value A variable stored on client computer document.cookie=<Name-value pair>,<Expiration Date>,<Domain&path of server it should be sent to>
Explain Cookie Expiration Stored in UPC time. If empty, the cookie is trashed when browser closed.
Explain Cookie domain&path Tells browser what domain to sendn cookie to. If not set, it is domain where cookie is set.Default is '/' which is valid thru whole domain.
JS Math functions Round/Random/Max/Min
Define RegExp An object that describes a pattern of characters. Used to find-match chars. var patt=New RegExp("e")
RegExp Functions Test() & exec() Test returns true on match Exec returns the matching char Ex:var patt= new RegExp("e") document.write(patt.test("Best")); document.write(patt.exec("Best"));
Dates Explained Are calculated in millisec since 01/01/70
Array defn. 3 types var myArray = new Array(); myArray[0]="Saab"; myArray[1]="BMW"; var myArray = new Array("Saab", "BMW"); var myArray=["Saab","BMW"];
How to join array & example Concat myArray(array1,..arrayN);
Add & Remove Last Array element Pop & Push(value)
Add & Remove First Array element shift & unshift myArray.unshift("Value");
Specify Java script <script type="text/javascript">
Hide JS in comment tags, how & why. Wrap JS in <!-- (JS) //--> the '//' added so comment not picked up by JS.
JS comments Single line - // Multi-line - /* ~~ */
Variable Name Rules Must begin with letter or underscore
Variables and scope Variables defined in functions are local. Global:Defined outside the function or with an assignment.
Where is JS put In the body (typically at bottom) or in the head
How to call JS in page Place <script type="text/javascript" src="xxx.js"></script>
When is JS run. Executed when page is loaded unless it is inside a function. Function scripts are executed based on an event.
Is JS case sensitive? Yes
Operations Comparisons == - Equals === - Equals and same type
Logical functions && - and || - or ! - not
Message functions (3) Alert Confirm Promp
Alert Box Alert("someText"); Click 'Ok'
Confirm Box myVar=Confirm("someText"); click 'Ok' or 'Cancel' returns 'T'or 'F'
Prompt Box myVar=Prompt("SomeText","Default"); Returns input value
for statement for(Var=stmt;var<=endval;var=var+incr); for(i=0; i<5;i++)
Created by: 679557188