w3schools Javascript tutorial

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

arithmetic operators

(+ - * /)

javascript extension character

.js. Must be placed after sourcing an external file for reference.

assignment operators

=

What can document.getElementById() change?

Everything in a webpage.

Javascript rule

Numbers are not allowed as the first character. Hyphens are not allowed.

Most important rules for fixed values

Numbers are written with or without decimals Strings are text, written within double or single quotes.

Benefits to external files

Separates HTML and Javascript Makes HTML and Javascript easier to read Faster page loads

Syntax

Set of rules how code programs are constructed.

FUnction

a block of code that can be executed when called for.

An expression

a combination of values, variables and operators which computes to a value.

How document.getElemementById().innerHTML works

document.getElementById specifies that you want to manipulate the information marked by an id. The target id is to be placed in the () and innerHTML specifies the contents. = specifies to what you want to change the content.

Types of values in Javascript

literals and variables

=

operator used to assign values

Event

something that happens in the code, like someone clicking.

Camel Case

when the first letter of a separate word in a variable is capitalized. Example: CamelCase

Possible display tags

window.alert() document.write() innerHTML. console.log()


Ensembles d'études connexes

Section 4: Tax Strategies and Planning - quiz questions

View Set

med terms test 5 tophat terms Curtis

View Set

TTU Marketing 3350 Exam 1 Review

View Set

The Cold War and the Civil Rights Movement

View Set

Lying and Deception Final Study Guide

View Set

History Test 17.4 - King Henry VIII (8)

View Set

Biology A: Preparing for Quiz 1 Unit 2

View Set

Personality Final Exam review (Quizzes)

View Set