Giter VIP home page Giter VIP logo

creative-js's Introduction

Hello, there!

This is a brief explanation behind the purpose of this repo. The repo hosts lessons for general exercises and practice regarding JavaScript. I practice DOM manipulation, general JS loops, operator assignments, conditionals as well as a plethora of es5 and es6 functions. I plan to add a lot more content regarding object-oriented JS, in addition to several more JS projects I will soon initiate.

In additional to a console guessing-game, the guessing-game.js file hosts the majority of my JS practice - currently, functions and I have memorized and practice regularly to solidify muscle memory in typing them out.

Below is a snippet of the practice problems in there:

// // function guessGame(){
// //     let randomNum = Math.floor(Math.random() * 10);
// //     let guess;
// //
// //     do {
// //         guess = prompt('Pick num from 1 and 10');
// //
// //         if (guess < randomNum){
// //             console.log('guessed too low');
// //         } else if (guess > randomNum){
// //             console.log('guessed too high');
// //         }
// //     } while (guess != randomNum);
// //     console.log('ya did it - ya win');
// // }
// // guessGame();
//
// // for(var i = 1; i <= 100; i++){
// //     if (i % 15 == 0) console.log('FizzBuzz');
// //     else if (i % 3 == 0) console.log('Fizz');
// //     else if (i % 5 == 0) console.log('Buzz');
// //     else console.log(i);
// // }
//
// // function fruit(name, color, shape){
// //     this.name = name;
// //     this.color = color;
// //     this.shape = shape;
// //
// //     this.describe = function(){
// //         return 'A '+this.name+' is the color '+this.color+' and is the shape '+this.shape;
// //     }
// // }
// // let melon = new fruit('melon','green','round');
// // console.log(melon.describe());
// // let banana = new fruit('banana','yellow','banana');
// // console.log(banana.describe());
// // let apple = new fruit('apple','red or green','round');
// // console.log(apple.describe());
// //finding second to highest value of array:
//
// // function nextBiggest(arr) {
// //     let max = -Infinity, result = -Infinity;
// //
// //     for (const value of arr) {
// //         const nr = Number(value)
// //
// //         if (nr > max) {
// //             [result, max] = [max, nr] // save previous max
// //         } else if (nr < max && nr > result) {
// //             result = nr; // new second biggest
// //         }
// //     }
// //
// //     return result;
// // }
// //
// // const arr = ['20','120','111','215','54','78'];
// // console.log(nextBiggest(arr));
// //with sort:
// // var arr = ['20','120','111','215','54','78'];
// //
// // arr.sort(function(a,b){
// //     return b-a;
// // });
// //
// // console.log(arr[1]);
//
//
// //check if string is a palindrome
// // const isPalindrome = (string) => {
// //     const regularOrder = string;
// //     const reverseOrder = regularOrder.split('').reverse().join('');
// //     console.log(regularOrder === reverseOrder);
// // }
// // isPalindrome('holloh');

If you have any questions, or wish to collaborate on any project together, please let me know: [email protected]

creative-js's People

Contributors

sinisatesic avatar cptcrunchy avatar

Watchers

James Cloos 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.