Saturday, 17 June 2023
How to Make a Bulb Effect Using JavaScript || JavaScript Projects
Monday, 12 June 2023
Mostely Used Math Methods In JavaScript || JS Methods
In JavaScript, there are numerous mathematical methods available. Here are five commonly used math methods:
1. Math.abs(x): This method returns the absolute (positive) value of a number. For example:
2. Math.round(x): It rounds a number to the nearest integer. If the decimal part is 0.5 or higher, it rounds up; otherwise, it rounds down. For example:
3. Math.ceil(x): This method rounds a number up to the nearest integer, regardless of the decimal part. For example:
4. Math.floor(x): It rounds a number down to the nearest integer, regardless of the decimal part. For example:
5.Math.random(): This method generates a random floating-point number between 0 and 1 (exclusive). For example, to generate a random integer between 1 and 10, you can use the following formula:
These are just a few examples of commonly used math methods in JavaScript. There are many more available in the `Math` object that provide various functionalities for mathematical operations.
Explain :-
Certainly! Here are some labels for the most commonly used math methods in JavaScript:
1. Absolute Value:
- Method: `Math.abs()`
- Purpose: Returns the absolute (positive) value of a number.
2. Rounding:
- Method: `Math.round()`
- Purpose: Rounds a number to the nearest integer.
3. Ceiling:
- Method: `Math.ceil()`
- Purpose: Rounds a number up to the nearest integer.
4. Floor:
- Method: `Math.floor()`
- Purpose: Rounds a number down to the nearest integer.
5. Random Number:
- Method: `Math.random()`
- Purpose: Generates a random floating-point number between 0 and 1.
These labels provide a brief description of the purpose of each method, helping to identify their primary functionalities.
Wednesday, 7 June 2023
Most Important JavaScript Methods || JavaScript Practice
JavaScript Methods
Tuesday, 6 June 2023
5 Basic JavaScript Methods || Most Important Methods
Monday, 5 June 2023
JavaScript Question Practice For Logic Building || JS QNA
JavaScript Question Practice For Logic Building
Friday, 2 June 2023
JavaScript Questions For Practice || JavaScript Practice || Important Question
JavaScript Questions For Practice || JavaScript Practice || Important Question || Practice Set
<script>
-
The JavaScript `map()` method is used to create a new array by calling a provided function on each element of the original array. It execu...
-
How To Create Form Using HTML <! DOCTYPE html > < html > < head > < title > HTML Form Example </ title ...
-
<! DOCTYPE html > < html lang = "en" > < head > ...
