Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

In programming there are different types of data. You've used one data type already: string.

Computers recognise strings as a sequence of characters but to humans, strings are simply lines of text.

var message = "This is a string";

Notice that strings are always wrapped inside of quote marks. We do this so that the computer knows when the string starts and ends.

You can check that the data is a string by using the typeof operator:

var message = "This is a string";
var messageType = typeof message;

console.log(messageType); // logs 'string'

Exercise

  • Write a program that logs a message and its type

Expected result

This is a string
string