JavaScript: Alerts and Data types

Table of Contents

Intro

I started learning JavaScript for 2 new projects I’m doing (one is in testing environment before production, and the other will be after I will start learning a framework I want.) I want to document everything I learn, so here we go!

JavaScript

Resources

MDN resources for developers- JavaScript. Principles of writing consistent JavaScript.

“;” and alert

function("message"); // ; is the end

Alert: Pops out an alert window.

alert("string");

3 types of data

A way of classifying data.

  • String: text.
  • Numbers: 1, 2, 3, 4.
  • Boolean: true, false.

typeof():  returns a string indicating the type of the operand’s value

typeof();