JavaScript Flashcards

1
Q

JavaScript is the _________ ________ for the Web

A

Programming Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JavaScript can update and change both ____ and ___

A

HTML and CSS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Strings are text, written within double or single quotes:

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In a programming language, ________ are used to store data values.

A

variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

JavaScript uses the ___ keyword to declare variables.

A

var or let

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly