JavaScript Variables

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

console.log('Hello world');

hello world

What is the correct way to declare a new variable that you can change?

let change = 'change variable'

What is string concatenation?

When you join strings together

Which is an example of a single line comment?

//This is a comment

What are variables used for in JavaScript?

For storing or holding data

What is string interpolation?

Using template literals to embedded variables into strings

What is the correct way to call a string's built-in method?

'hello world'.toUpperCase()

What is the outcome of this statement? console.log('hi!'.length);

3

What will the following code print to the console? let num = 10; num *= 3; console.log(num);

30

What is the correct way to call the random method on the Math global object?

Math.random()


Ensembles d'études connexes

Retirement Plans: Variable Annuities (UITs)

View Set

NUR313 Evolve: AQ 17 - Drugs for Diabetes

View Set

AMERICAN HISTORY AIR TEST BIG TEN STUDY GUIDE

View Set

Chapter 1: Sociology in a Changing World

View Set

TYPE 1 DIABETES/KETOACIDOSIS/INSPIDUS/SIADH

View Set

Lesson 7: Implementing Authentication Controls

View Set