Pertemuan 13 JavaScript.

Slides:



Advertisements
Similar presentations
Executes a statement or statements for a number of times – iteration. Syntax for(initialize; test; increment) { // statements to be executed } Initial.
Advertisements

Javascript II Expressions and Data Types. 2 JavaScript Review programs executed by the web browser programs embedded in a web page using the script element.
WEB DESIGN AND PROGRAMMING Introduction to Javascript.
Javascript. Javascript Tools Javascript Console Javascript Console Debugger Debugger DOM Inspector DOM Inspector.
JavaScript For...In Statement The for...in statement loops through the elements of an array or through the properties of an object. Syntax for (variable.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Objects.  Java Script is an OOP Language  So it allows you to make your own objects and make your own variable types  I will not be going over how.
Ch 6: JavaScript Introduction to scripting part 2.
CS346 Javascript -3 Module 3 JavaScript Variables.
Conditional Statements © Copyright 2014, Fred McClurg All Rights Reserved.
More loops while and do-while. Recall the for loop in general for (initialization; boolean_expression; update) { }
Module 5 JavaScript Operators. CS346 Javascript-52 Examples  JS-5 Examples.
A: A: double “4” A: “34” 4.
Chapter 9: Control Statements II CIS 275—Web Application Development for Business I.
5 th and 4 th ed: Chapters 9, 10, 11 SY306 Web and Databases for Cyber Operations SlideSet #7: JavaScript Functions and Arrays.
Expressions and Data Types Professor Robin Burke.
Modern JavaScript Develop And Design Instructor’s Notes Chapter 4 – Simple Variable Types Modern JavaScript Design And Develop Copyright © 2012 by Larry.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Pertemuan 3 JavaScript.
CGS 3066: Web Programming and Design Spring 2017
JavaScript.
Build in Objects In JavaScript, almost "everything" is an object.
Java Script Introduction. Java Script Introduction.
LOOPING DAN FUNCTION Pertemuan 5.
Pertemuan 7 JavaScript.
HTML & teh internets.
Javascript Example
JavaScript - Errors & Exceptions Handling
JavaScript Objects.
Web Technologies PHP 5 Basic Language.
JSON Crash Course Traversy Media.
WEB APPLICATION PROGRAMMING
JavaScript.
CHAPTER 4 CLIENT SIDE SCRIPTING PART 2 OF 3
14 A Brief Look at JavaScript and jQuery.
BY: SITI NURBAYA ISMAIL FACULTY of COMPUTER and MATHEMATICAL SCIENCES
JavaScript Objects.
Chapter 19 JavaScript.
JavaScript and Ajax (Expression and Operators)
Review Operation Bingo
Javascript الجافا سكربت هي لغة برمجه اذا جاز التعبیر تلعب دور حیوي وفعال في صفحات الویب من خلال القیام بوظائف قد تكون خارجیة او داخلیة بل لنكن اكثر دقة.
BY: SITI NURBAYA ISMAIL FACULTY of COMPUTER and MATHEMATICAL SCIENCES
يمكن استدعاء الكود الوظيفي عند حدث معين أو عند استدعاء الكود الوظيفي .
البرمجة بلغة الفيجول بيسك ستوديو
البرمجة بلغة فيجول بيسك ستوديو
Pertemuan 11 JavaScript.
Pertemuan 3 JavaScript.
Pertemuan 10 JavaScript.
يمكن استدعاء الكود الوظيفي عند حدث معين أو عند استدعاء الكود الوظيفي .
برمجة صفحات إنترنت (JavaScript )
INFO/CSE 100, Spring 2005 Fluency in Information Technology
kbkjlj/m/lkiubljj'pl;
T. Jumana Abu Shmais – AOU - Riyadh
with a value of javascript:onclick=resizeWindow()
Lect2 (MCS/BCS) Javascript.
The Internet 11/15/11 Handling Data in JavaScript
HTML scripts.
Variables Kevin Harville.
Conditional Statements & Loops in JavaScript
CSC318 – DYNAMIC WEB APPLICATION DEVELOPMENT
M150: Data, Computing and Information
CSC318 – WEB APPLICATION DEVELOPMENT
For this assignment, copy and past the XHTML to a notepad file with the .html extension. Then add the code I ask for to complete the problems.
Pertemuan 10 JavaScript.
Tutorial 10: Programming with javascript
The <script> Tag
Software Engineering for Internet Applications
CHAPTER 2 BASIC JAVASCRIPT INSTRUCTIONS
Pertemuan 12 JavaScript.
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

Pertemuan 13 JavaScript

Boolean and Match Object Boolean Object Match Oject

Boolean <html> <body> <script type="text/javascript"> var b1=new Boolean( 0); var b2=new Boolean(1); var b3=new Boolean(""); var b4=new Boolean(null); var b5=new Boolean(NaN); var b6=new Boolean("false"); document.write("0 is boolean "+ b1 +"<br />"); document.write("1 is boolean "+ b2 +"<br />"); document.write("An empty string is boolean "+ b3 + "<br />"); document.write("null is boolean "+ b4+ "<br />"); document.write("NaN is boolean "+ b5 +"<br />"); document.write("The string 'false' is boolean "+ b6 +"<br />"); </script> </body> </html> 0 is boolean false 1 is boolean true An empty string is boolean false null is boolean false NaN is boolean false The string 'false' is boolean true

Match Object round() random() max() min()

round() 1 1 0 -4 -5 <html> <body> <script type="text/javascript"> document.write(Math.round(0.60) + "<br />"); document.write(Math.round(0.50) + "<br />"); document.write(Math.round(0.49) + "<br />"); document.write(Math.round(-4.40) + "<br />"); document.write(Math.round(-4.60)); </script> </body> </html>

random() <html> <body> <script type="text/javascript"> document.write(Math.random()); </script> </body> </html> 0.43995992964571484

max() <html> <body> <script type="text/javascript"> document.write(Math.max(5,7) + "<br />"); document.write(Math.max(-3,5) + "<br />"); document.write(Math.max(-3,-5) + "<br />"); document.write(Math.max(7.25,7.30)); </script> </body> </html> 7 5 -3 7.3

min() <html> <body> <script type="text/javascript"> document.write(Math.min(5,7) + "<br />"); document.write(Math.min(-3,5) + "<br />"); document.write(Math.min(-3,-5) + "<br />"); document.write(Math.min(7.25,7.30)); </script> </body> </html> 5 -3 -5 7.25

Tugas