Welcome to the JavaScript repository! This repo contains various JavaScript files demonstrating different concepts, from basic syntax and data types to advanced features like DOM manipulation.
- .gitignore: Specifies files and directories that should be ignored by Git.
- js.html: An HTML file to test and run the JavaScript scripts.
- LICENSE: The license for this repository.
- node.js: A readable JavaScript file with comments explaining each concept.
- script.js: A JavaScript file that is more optimized for execution. This file is meant to be directly run in environments like browsers or Node.js.
-
Comments:
- Single-line (
//
) and multi-line (/* ... */
) comments.
- Single-line (
-
Data Types:
null
,number
,Symbol
,String
,BigInt
,Boolean
, andundefined
.
-
Variables:
- Using
let
,const
, andvar
to declare variables.
- Using
-
Operators:
- Arithmetic, Assignment, Comparison, and Logical operators.
-
Functions:
- Function declarations and arrow functions.
-
Loops:
for
loop,for...in
loop, andfor...of
loop.
-
Strings:
- String properties, methods, and escape sequences.
-
Arrays:
- Array methods like
push
,pop
,shift
,unshift
,concat
, andsort
.
- Array methods like
-
DOM Manipulation:
- Basic DOM manipulation methods.
- node.js: A well-documented, readable JavaScript file to help developers understand various JavaScript concepts with comments and examples.
- script.js: A concise, clean JavaScript file designed to be executed. It has less explanation and focuses on functionality.
-
Run in Browser:
- Open
js.html
in a browser to test the JavaScript code included in the HTML file.
- Open
-
Run with Node.js:
- Use Node.js to execute
script.js
by runningnode script.js
in your terminal.
- Use Node.js to execute
This repository is licensed under the Apache 2.0 License.