Skip to main content

Home/ Learning Library/ Group items tagged Writing

Rss Feed Group items tagged

Sunny Jackson

JavaScript Statements - 0 views

  • JavaScript is Case Sensitive
  • A JavaScript statement is a command to a browser. The purpose of the command is to tell the browser what to do.
  • It is normal to add a semicolon at the end of each executable statement.
  • ...6 more annotations...
  • Using semicolons makes it possible to write multiple statements on one line.
  • JavaScript code (or just JavaScript) is a sequence of JavaScript statements.
  • Each statement is executed by the browser in the sequence they are written.
  • JavaScript statements can be grouped together in blocks. Blocks start with a left curly bracket {, and ends with a right curly bracket }.
  • The purpose of a block is to make the sequence of statements execute together.
  • Normally a block is used to group statements together in a function or in a condition (where a group of statements should be executed if a condition is met).
Sunny Jackson

JavaScript Comparison and Logical Operators - 0 views

  • Comparison operators can be used in conditional statements to compare values and take action depending on the result: if (age<18) document.write("Too young");
  • JavaScript also contains a conditional operator that assigns a value to a variable based on some condition. Syntax variablename=(condition)?value1:value2 
Sunny Jackson

JavaScript Popup Boxes - 0 views

  • JavaScript has three kind of popup boxes: Alert box, Confirm box, and Prompt box.
  • Alert Box An alert box is often used if you want to make sure information comes through to the user. When an alert box pops up, the user will have to click "OK" to proceed.
  • Syntax alert("sometext");
  • ...5 more annotations...
  • <script type="text/javascript"> function show_alert() { alert("I am an alert box!"); } </script>
  • Confirm Box A confirm box is often used if you want the user to verify or accept something. When a confirm box pops up, the user will have to click either "OK" or "Cancel" to proceed. If the user clicks "OK", the box returns true. If the user clicks "Cancel", the box returns false. Syntax confirm("sometext");
  • <script type="text/javascript"> function show_confirm() { var r=confirm("Press a button"); if (r==true)   {   alert("You pressed OK!");   } else   {   alert("You pressed Cancel!");   } } </script>
  • Prompt Box A prompt box is often used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value. If the user clicks "OK" the box returns the input value. If the user clicks "Cancel" the box returns null. Syntax prompt("sometext","defaultvalue");
  • <script type="text/javascript"> function show_prompt() { var name=prompt("Please enter your name","Harry Potter"); if (name!=null && name!="")   {   document.write("Hello " + name + "! How are you today?");   } } </script>
Sunny Jackson

BASIC - Wikipedia, the free encyclopedia - 0 views

  • high-level programming language
  • Beginner's All-purpose Symbolic Instruction Code
  • designed in 1964 by John George Kemeny and Thomas Eugene Kurtz
  • ...1 more annotation...
  • to provide computer access to non-science students. At the time, nearly all use of computers required writing custom software, which was something only scientists and mathematicians tended to do.
Sunny Jackson

Hugo Award for Best Semiprozine - Wikipedia, the free encyclopedia - 0 views

  • The Hugo Awards are given every year by the World Science Fiction Society for the best science fiction or fantasy works and achievements of the previous year.
  • once officially known as the Science Fiction Achievement Award
  • The award has been described as "a fine showcase for speculative fiction" and "the best known literary award for science fiction writing".
‹ Previous 21 - 26 of 26
Showing 20 items per page