Skip to content

junaidshaikh-js/fun-with-triangles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neoG Camp - Fun With Triangles

Calculate area, the hypotenuse of the triangle, play a quiz based on the triangle and give three angles to decide if they form a triangle.

Table of contents

Overview

Screenshot

preview of project

preview of project

preview of project

preview of project

Links

My process

Built with

  • Semantic HTML5 markup
  • Sass - CSS extension language
  • CSS Flexbox
  • Vanilla JavaScript

What I learned

Fun With triangles is multipage website. I learned multiple things in this project.

  1. Node.insertBefore()

The Node.insertBefore() insert a node before a reference node having the same parent element.

Syntax

parentNode.insertBefore(nodeToInsert, refernceNode);
  1. I learned to set attribute using JavaScript using setAttribute() method

Syntax

element.setAttribute("attributeName", "attributeValue");
  1. For the first time I worked with FormData API. In the quiz section of project, I used FormData API to evaluate the answers submitted by the user.

Example from Code

let formData = new FormData(quizForm);
let index = 0;

for (let value of formData) {
  if (answers[index] == value[1]) {
    score++;
  }
  index++;
}

Author

About

Calculate area, the hypotenuse of the triangle, play a quiz based on the triangle and give three angles to decide if they form a triangle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published