My Software Engineering Notes Help

Vanilla JavaScript Fundamentals Part 2

In-complete

javascript

Abbreviations

  • *[CSS]: Cascading Style Sheet

  • *[HTML]: Hypertext Markup Language

  • *[JS]: JavaScript

Let’s dive right in to JavaScript!

Learning Outcomes

  • Name the eight data types in JavaScript.

  • Understand the difference between single, double, and backtick quotes.

  • Embed a variable/expression in a strings.

  • Understand what a method is.

  • Name the three logical operators.

  • Understand what the comparison operators are.

  • Understand what nesting is.

  • Understand what truthy and falsy values are.

Strings

Depending on what kind of work you’re doing, you might end up working more with pieces of text rather than numbers. A * string* is simply a piece of text… and is a fundamental building block of the language.

  1. Read and code along with yet another MDN tutorial.

  2. Got through this lesson ton learn a bit more about what you can do with strings...be sure to take a peek at the String Reference page near the bottom, and do the exercises at the end!

  3. Vocabulary time: a method is a bit of functionality that is built into the language or into specific data types. In the previous W3Schools exercise, you learned a few methods that can be sued on strings, such as indexOf and search. An exhaustive list of methods that can be used on strings can be found here.

The Basics

Creating a string

const string = 'The revolution will not be televised.'; console.log(string);

We are declaring a variable, initializing it with a string value, and then returning the value. When writing a string, you need to surround the value with quotes.

Conditionals

Last modified: 10 March 2024