Celebrating 80th Independence Day of India• Jai Hind •Bharat Mata Ki Jai• Jai Hind •Long Live India• Jai Hind •Jai Hind• Jai Hind •

Basic Question of JavaScript

Ashutosh Anand Tiwari
By Ashutosh Anand TiwariPublished Oct 2, 2025 · 3 min read

What is JavaScript?

JavaScript is a scripting language that enables interactive web pages. It's commonly used to create dynamic content, control multimedia, and handle user interactions like clicks and form submissions. JavaScript is executed on the client's browser, allowing developers to build responsive and engaging websites.

Who created JavaScript?

JavaScript was created by Brendan Eich in 1995 during his work at Netscape Communications. Initially named Mocha, it was later renamed JavaScript. The language was designed to enable dynamic and interactive elements within web browsers.

What are variables in JavaScript?

Variables in JavaScript are used to store data that can be accessed and modified throughout the program. You can declare variables using var, let, or const. The let and const keywords are more modern and provide better scoping compared to var. For example, let name = "John"; creates a variable that holds the value "John".

What are operators in JavaScript?

Operators in JavaScript are symbols used to perform operations on values and variables. These operations include arithmetic (+, -, *, /), comparison (==, ===, !=), logical (&&, ||, !), and assignment (=, +=, -=) operators. For example, let x = 10 + 5; uses the + operator to add two values together.

What are comments in JavaScript, and how do you write them?

Comments in JavaScript are used to leave explanatory notes in the code. They are ignored by the JavaScript engine during execution and do not affect the program.

  • Single-line comment:

    Use

    //

    for a comment on one line. Example:

    // This is a single-line comment

  • Multi-line comment:

    Use

    /*

    to start and

    */

    to end a multi-line comment. Example:

Continue Exploring

Profile

Ashutosh Anand Tiwari

Follow

Writer & curator of this digital garden — open notes for learners worldwide.

Request a Topic

Want me to write notes on a course?

Tell me the course, book, or research topic you want covered. If it helps learners, I'll consider adding structured digital notes for it in the garden.

Collaborate

Have a notes collection to feature here?

Do you have open notes you want featured in this digital garden? Let me know — we can collaborate and publish them for learners worldwide.