Author: admin

  • MongoDB Getting Started

    MongoDB MongoDB is a document database and can be installed locally or hosted in the cloud. SQL vs Document Databases SQL databases are considered relational databases. They store related data in separate tables. When data is needed, it is queried from multiple tables to join the data back together. MongoDB is a document database which…

  • MongoDB Tutorial

    A MongoDB Document Records in a MongoDB database are called documents, and the field values may include numbers, strings, booleans, arrays, or even nested documents. Example Document Learning by Examples Our “Show MongoDB” tool makes it easy to demonstrate MongoDB. It shows both the code and the result. Example Find all documents that have a…

  • JavaScript Objects

    What is an Object? JavaScript is an object-based language and in JavaScript almost everything is an object or acts like an object. So, to work with JavaScript effectively and efficiently we need to understand how objects work as well as how to create your own objects and use them. A JavaScript object is just a…

  • JavaScript Functions

    What is Function? A function is a group of statements that perform specific tasks and can be kept and maintained separately form main program. Functions provide a way to create reusable code packages which are more portable and easier to debug. Here are some advantages of using functions: The following section will show you how…

  • JavaScript Loops

    Different Types of Loops in JavaScript Loops are used to execute the same block of code again and again, as long as a certain condition is met. The basic idea behind a loop is to automate the repetitive tasks within a program to save the time and effort. JavaScript now supports five different types of…

  • JavaScript Sorting Arrays

    Sorting an Array Sorting is a common task when working with arrays. It would be used, for instance, if you want to display the city or county names in alphabetical order. The JavaScript Array object has a built-in method sort() for sorting array elements in alphabetical order. The following example demonstrates how it works: Example Reversing an…

  • JavaScript Arrays

    What is an Array Arrays are complex variables that allow us to store more than one value or a group of values under a single variable name. JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays, thus making it possible to create more complex data structures such as…

  • JavaScript Switch…Case Statements

    Using the Switch…Case Statement The switch..case statement is an alternative to the if…else if…else statement, which does almost the same thing. The switch…case statement tests a variable or expression against a series of values until it finds a match, and then executes the block of code corresponding to that match. It’s syntax is: switch(x){case value1:        // Code to be executed if x ===…

  • JavaScript If…Else Statements

    JavaScript Conditional Statements Like many other programming languages, JavaScript also allows you to write code that perform different actions based on the results of a logical or comparative test conditions at run time. This means, you can create test conditions in the form of expressions that evaluates to either true or false and based on these results you can…

  • JavaScript Numbers

    Working with Numbers JavaScript supports both integer and floating-point numbers that can be represented in decimal, hexadecimal or octal notation. Unlike other languages, JavaScript does not treat integer and floating-point numbers differently. All numbers in JavaScript are represented as floating-point numbers. Here’s an example demonstrating the numbers in different formats: Example Extra large numbers can…