What are different type of operators, use of includes() , use of charAt() in Javascript.

Опубликовано: 24 Июль 2026
на канале: Code with Ghan!
20
1

Q1. What are different type of operators?
A: Operators are special identifiers which are used to perform an operations/calculations with values.
Arthmetical operator, comparison operator, assignment operator (+=), logical operator (&&, ||, !), typeof operator, Instance of operators

Q:2 How to check perticular word exists in content or not?
A: By using includes() string function in javascript.

Example:
// var someText = "Hi how are you, javascript classes going On";
// var checkingValue = someText.includes('hi');
// console.log(checkingValue); O/P: false

Q3. How to find the character at particular index?
A: By using charAt(index) string function.
var name = "Ghan";
console.log(name.charAt(0)); // G

Git : https://github.com/javascriptwithghan/
Website: https://codewithghan.com/