JavaScript
JavaScript

JavaScript

Projects Links [Fiddle, Code-Pen, GitHub]

Naming Conventions Best Practise

  1. Use descriptive names for variables, functions, and classes:
    1. // Example: const firstName = 'John'; function calculateArea(width, height) { ... } class User { ... }
  1. Use camelCase for variable and function names:
    1. // Example: const numberOfItems = 10; function getUserDetails() { ... }
  1. Use PascalCase for class names:
    1. // Example: class Car { ... }
  1. Avoid using single-letter variable names:
    1. // Bad Example: const x = 10; // Good Example: const age = 25;
  1. Use meaningful names for boolean variables:
    1. // Bad Example: const flag = true; // Good Example: const isAvailable = true;
  1. Use plural names for arrays:
    1. // Example: const fruits = ['apple', 'banana', 'orange'];
  1. Use uppercase letters for constants:
    1. // Example: const PI = 3.14159;
  1. Use verbs for function names that perform an action:
    1. // Example: function calculateSum(a, b) { ... }
  1. Use nouns for function names that return a value:
    1. // Example: function getProductDetails(productId) { ... }
  1. Avoid using reserved keywords as variable names:
    1. // Bad Example: let let = 10; // Good Example: let count = 10;
Assignments


🔓
JS Study Documentations

Video Lectures 📺

Video preview
Video preview
Video preview
Video preview
Video preview
Video preview
Video preview
Video preview
Video preview

Practice Codes

Building Table Type 1

<Html> <Head> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> </Head> <Body> <H1> This is User Table Practice code </H1> <button id="btn"> Click Me! </button> <table id="Table-Id"> <thead> <tr> <th>Name</th> <th>Age</th> <th>Email</th> </tr> </thead> <tbody> </tbody> </table> </Body> </Html>
$(function() { $("#btn").on("click", function() { $.ajax({ type: "Get", dataType: "json", url: "https://dummyjson.com/users", success: function(jsonResponse) { $.each(jsonResponse.users, function(index, user) { $("#Table-Id tbody").append( "<tr>" + "<td>" + user.firstName + " " + user.lastName + "</td>" + "<td>" + user.age + "</td>" + "<td>" + user.email + "</td>" + "</tr>" ); }); } }); }); });
table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; }

Building Table Type 2

<Html> <head> <title>Table Type 2</title> </head> <body> <table id="Data-Table"> </table> </body> </Html>
$(function() { $.ajax({ 'url': 'https://dummyjson.com/users', 'method': 'GET', 'contentType': 'application/json', success: function(jsonResponse) { myJsonData = jsonResponse; makeDataHeader(); populateData(myJsonData); } }); function makeDataHeader() { var headerRow = "<thead><tr>" + "<th>Sr.No.</th>" + "<th>First Name</th>" + "<th>Middle Name</th>" + "<th>Last Name</th>" + "</tr></thead>"; $('#Data-Table').html(headerRow); } function populateData(data) { $('#Data-Table').DataTable().clear(); data.users.forEach(function(user) { $('#Data-Table').dataTable().fnAddData([ user.id, user.firstName, user.maidenName, user.lastName ]); }); } });
table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; }
 
🛣️
Path

Level Projects

Intermediate projects (4-7 days)
Weather App
Pomodoro Timer
Quiz App
Advanced projects (1-2 weeks)
E-commerce Website
Social Media Platform
Music Player

Projects using different libraries:

React.js and its ecosystem (Redux, Next.js, etc.):
Simple To-Do List with React
Movie Search App with React and Redux
E-commerce Website with React and Next.js
Vue.js and its ecosystem (Vuex, Nuxt.js, etc.):
Simple To-Do List with Vue
Weather App with Vue and Vuex
E-commerce Website with Vue and Nuxt.js
Angular.js:
Simple Calculator with Angular
Social Media App with Angular and Firebase
E-commerce Website with Angular
Express.js:
Simple API with Express
To-Do List API with Express and MongoDB
Blog API with Express, MongoDB, and GraphQL
Node.js:
Simple Chat App with Node.js and Socket.io
E-commerce Website with Node.js and MongoDB
Blog with Node.js, Express, and MongoDB
GraphQL:
Simple GraphQL API with Node.js and Express
E-commerce Website with GraphQL and MongoDB
Blog with GraphQL, Node.js, and MongoDB
TypeScript:
Simple To-Do List with TypeScript
E-commerce Website with TypeScript and React
Blog with TypeScript, Express, and MongoDB
MongoDB:
Simple To-Do List API with MongoDB and Express
E-commerce Website with MongoDB and Node.js
Blog with MongoDB, Express, and GraphQL
 
 
 
Built with Potion.so