Skip to content
  • Home
  • ES6
  • ES.Next
  • JS BOM
  • JS DOM
  • Web API
  • Snippets
  • TypeScript
Dark Mode Light Mode

Home » DOM » Traversing

Traversing

Get the Parent of an Element

Get the parent node of an element by using the parentNode property of the element.

Get the Closest Element by Selector

Get the closest element tht match a selector.

Get Siblings of an Element

Provide a helper function that returns all siblings of an element.

Get the Children of an Element

Get all the child elements of an element

Getting Started

  • What is JavaScript
  • Install a JavaScript Code Editor
  • Meet the Console Tab of Devtools
  • JavaScript Hello World

JavaScript Fundamentals

  • Syntax
  • Variables
  • Data Types
  • Number
  • Boolean

JavaScript Operators

  • Unary Operators
  • Assignment Operators
  • Logical Operators
  • Comparison Operators

Control Flow

  • if else
  • switch case
  • while
  • do-while
  • for
  • break
  • continue

JavaScript Strings

  • JavaScript Strings
  • String Type
  • Concatenating Strings: concat()
  • Splitting a String into Substrings: split()
  • Locating a Substring Forward: indexOf()
  • Locating a Substring Backward: lastIndexOf()
  • Extracting a Substring from a String: substring()
  • Removing Whitespaces from Both Ends: trim()
  • Extracting a part of a String: slice()

JavaScript Array

  • JavaScript Arrays
  • JavaScript Array Length
  • Stack
  • Queue
  • Manipulate Elements: splice()
  • Sort Elements: sort()
  • Locate Elements: indexOf()
  • Check If Every Element Passes a Test: every()
  • Check If At Least One Element Passes a Test: some()
  • Filter Array Elements: filter()
  • Reduce an Array Into a Value: reduce()
  • Transform Array Elements: map()
  • Loop Through Array: forEach()
  • Concatenating Array Elements Into a String: join()
  • Multidimensional Array

JavaScript Functions

  • Functions
  • Functions are First-Class Citizens
  • Anonymous Functions
  • IIFE
  • Callback Functions

JavaScript Objects

  • JavaScript Objects
  • Object Properties
  • Constructor Functions
  • Javascript Prototypes
  • Constructor/Prototype Pattern
  • Prototypal Inheritance
  • THIS Keyword
  • Factory Functions
  • for…in Loop
  • Enumerable Properties
  • Own Properties
  • Primitive vs. Reference Values
  • Primitive Wrapper Types

Advanced Functions

  • Passing By Value
  • Returning Multiple Values
  • Function Type
  • The call() Method
  • The apply() method
  • The bind() Method
  • Recursive Functions
  • Closures

Regular Expressions

  • Basic Regular Expressions
  • Character Classes
  • Anchors
  • Sets and Ranges
  • Word Boundaries
  • Quantifiers
  • search()
  • match()
  • replace()

JavaScript Runtime

  • Execution Context
  • Call Stack
  • Event Loop
  • Hoisting
  • Variable Scopes

About JavaScript Tutorial

The JavaScript Tutorial website helps you learn JavaScript programming from scratch quickly and effectively.

Recent Tutorials

  • JavaScript String replaceAll
  • An Essential Guide to JavaScript null
  • How to Check if an Array Contains a Value in Javascript
  • How to Check If a Variable is an Array in JavaScript
  • How to Replace All Occurrences of a Substring in a String

Site Links

  • About Us
  • Contact Us
  • Privacy Policy

Copyright © 2021 by JavaScript Tutorial Website. All Right Reserved.