JavaScript Flashcards
1
Q
JavaScript is the _________ ________ for the Web
A
Programming Language
2
Q
JavaScript can update and change both ____ and ___
A
HTML and CSS
3
Q
Strings are text, written within double or single quotes:
True or False
A
True
4
Q
In a programming language, ________ are used to store data values.
A
variables
5
Q
JavaScript uses the ___ keyword to declare variables.
A
var or let
6
Q
Write a simple JavaScript program that on button click displays the current timestamp on screen within the id tag “demo”.
My First JavaScript
// Using the id attribute
A
My First JavaScript
onclick=”document.getElementById(‘demo’).innerHTML = Date()”> // using the Date() function
Click me to display Date and Time.
// Using the id attribute