How To

What does !== mean in javascript
By Tan Lee Published on Dec 18, 2024 153

The `!==` operator in JavaScript is a strict inequality operator. It compares whether two values are not equal in both value and type, returning `true` if they are either not equal or of different types.

What is ternary operator in Javascript
By Tan Lee Published on Dec 18, 2024 156

The ternary operator, also known as the conditional operator, is a shorthand for an if-else statement in JavaScript. It takes three operands: a condition, a value to return if the condition is true, and a value to return if the condition is false.

How to use getElementById() in Javascript
By Tan Lee Published on Dec 18, 2024 235

The `getElementById()` method in JavaScript is used to select and retrieve an HTML element with a specified `id` attribute.

How to use for loop in Javascript
By Tan Lee Published on Dec 18, 2024 171

In JavaScript, a `for` loop is used to repeatedly execute a block of code a specific number of times.

How to use switch in Javascript
By Tan Lee Published on Dec 18, 2024 170

In JavaScript, the `switch` statement is used to perform different actions based on various conditions, similar to a series of `if...else` statements.

How to use .length in Javascript
By Tan Lee Published on Dec 18, 2024 211

In JavaScript, `.length` is a property that returns the number of items in an array or the number of characters in a string.

How to use `Object.values()` in JavaScript
By Tan Lee Published on Dec 18, 2024 169

The `Object.values()` method in JavaScript retrieves an array of an object's own enumerable property values, collecting all the values and returning them in array format.

How to use split() in Javascript
By Tan Lee Published on Dec 18, 2024 148

The `split()` method in JavaScript splits a string into an array of substrings, using a specified separator.

How to create a function Javascript
By Tan Lee Published on Dec 18, 2024 198

To create a function in JavaScript, you can use this simple syntax:

How to get milliseconds in Javascript
By Tan Lee Published on Dec 18, 2024 193

In JavaScript, you can get the current time in milliseconds using either `Date.now()` or the `getTime()` method of a `Date` object.

What is const in Javascript
By Tan Lee Published on Dec 18, 2024 217

`const` is a JavaScript keyword used to declare a variable whose value cannot be reassigned after initialization.

What Does `setInterval()` Mean in JavaScript
By Tan Lee Published on Dec 18, 2024 196

`setInterval()` is a JavaScript function that repeatedly executes a piece of code at a specified time interval.