Code Monkey home page Code Monkey logo

javascript-code-examples's Introduction

JavaScript Code Examples

This repository contains a collection of JavaScript code examples covering various concepts and use cases.

Table of Contents

  1. Simple Calculator
  2. Todo List with Local Storage
  3. Basic Weather App using Fetch API
  4. Simple Quiz Game
  5. Basic Timer using setTimeout
  6. Simple HTTP Server using Node.js
  7. Basic Promise Example
  8. Simple File System Operations using fs Module
  9. Simple EventEmitter Example

Simple Calculator

File: calculator.js

Description: This JavaScript file contains functions to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.

Todo List with Local Storage

File: todo.js

Description: This JavaScript file demonstrates how to create a simple todo list application using local storage for storing todo items.

Basic Weather App using Fetch API

File: weather.js

Description: This JavaScript file fetches weather data for a specific city using the Fetch API and displays the weather description.

Simple Quiz Game

File: quiz.js

Description: This JavaScript file implements a basic quiz game where the user is prompted with questions and can input answers.

Basic Timer using setTimeout

File: timer.js

Description: This JavaScript file implements a basic timer using the setTimeout function to display a countdown.

Simple HTTP Server using Node.js

File: http_server.js

Description: This JavaScript file demonstrates how to create a simple HTTP server using Node.js, which responds with "Hello, World!" to all requests.

Basic Promise Example

File: promise_example.js

Description: This JavaScript file demonstrates how to use promises to handle asynchronous operations. It defines an async function that resolves after a delay and logs the result.

Simple File System Operations using fs Module

File: file_system.js

Description: This JavaScript file demonstrates basic file system operations such as reading from and writing to a file using the fs module in Node.js.

Simple EventEmitter Example

File: event_emitter.js

Description: This JavaScript file demonstrates how to create and use a simple EventEmitter in Node.js to handle custom events.

javascript-code-examples's People

Contributors

aditimishra02 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.