Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 2.83 KB

JS-discussion-notes.md

File metadata and controls

51 lines (38 loc) · 2.83 KB

What is JavaScript?

JavaScript is a Scripting and a Programming language

What is a Scripting language?

Scripting languages are typically interpreted rather than compiled, which means they are executed line by line at runtime. Primarily for automating tasks, web development, and enhancing existing applications.

What is a Programming language?

Usually compiled into machine code before execution. Used for developing standalone applications, system software, and complex projects.

In short JavaScript is a versatile, high-level programming language - primarily used for creating interactive and dynamic content on websites.

  • It allow us to implement complex(and simple) feature on our web pages.
  • And with the help of JavaScript you can enable dynamic contents on your webpage.... like for example if you want to perform a certain action or a set of actions on the click of a button on your web page then you can do that with the help of JavaScript.

Some things that JavaScript can do

  • To store a values - you can store a value from your webpage in some variable.
  • Perform action - it can perform certain actions when they are triggered by something (on the click of a button - one of the most common ways to trigger any actions).
  • APIs - we can use APIs in our JavaScript program, it is like using Doremon's gadgets to add extra functionality/features to Nobita in your case it can add features and functionality to your website.

Storing values in JavaScript

If you want to store a value in JavaScript you will need to assign a name to it variable this will act as a flag on the memory where you have stored the information.

There are multiple ways to define a variable.

These are some ways that tells the computer what type of variable you just defined . const It will be a constant variable. You cannot redefine the variable again in the same program. let You can use this variable if you want the value of the variable to be flexible. You can redefine the varable inside another scope, whose value will be applicable only inside that particular scope. (keep learning and you will know what scope means) var It is similar to let but you cannot redefine it inside another scope.

After you define the variable (where you can store a value) you can store different types of values.

  • STRING

  • INT

  • FLOAT

  • BOOLEAN

  • NULL

  • OBJECT

  • SYMBOL


  • string - Normal texts like any name or sentences.

  • int - Any integer values like 1....9999...

  • float - Any decimal values like 3.14 or 1.695

  • boolean - At type of value which can be either true or false (if you see 1 and 0 it mesns true and false respectively).

  • null - It means neither zero (0) nor "undefined", it means "nothing".

  • object -

  • symbol -