Skip to content

rootnure/js-array-object-validation-22

Repository files navigation

js-ArrayObject-errorFunction-22

#JS Checklist

JS Concepts (Self Assessment)

    1. Can you declare a string type variable? A boolean type variable? A number type variable? If yes, write it on a js file (VS Code).
    1. Do you know when to declare a variable with let and when to use const? If you know declare some variables. Now change some variable value that can be changed.
    1. Do you know how to run math operations (+, -, *, /, %) on variables? If yes, then declare two number types variable, run addition operations and store the result in another variable. Similarly run subtraction, multiplication, division, remainder operations on the variables.
    1. Can you operate comparison operations (>, <, >=, <=, ==, !=) on variables? Then declare two number type variable and run this six types of comparison on them.
    1. If you are asked to fullfil two conditions and both conditions need to be fullfil, can you check that? Similarly asked to fulfil minimum one condition, can you do that? Means, can you use && and ||? If yes, then write a JS code where use this.
    1. Can you write "if this is true then this, else that" type code? Means, can you write if-else code? Then write a code where use this.
    1. If you are asked to write a code that give all the odd numbers between 7 to 19 using while loop, can you do that? Then write the code.
    1. If you are asked to declare an array, how many elements are there, change the 4th positioned value, add two new elements, remove one element, can you do so? Then write it down.
    1. Can you loop through an array using for loop? Normal for loop or for of loop. Then write a code like that.
    1. If you are told to console log the values of an array that are grater than 80, can you do that? Write the code.
    1. Multiplication of three numbers will be return as result. Can you write that code? Write the code then.
    1. Declare an object. That object will have three property and change value of one property.
  • If you are able to do a total of 9 to 10 or higher task from above then your basic concept is clear. If the total is between 5 to 9 then you have to hard work and give more time. And if it is less than 5 then you have to give time to JavaScript in a different way.

Problem Solving (Self Assessment)

    1. Write a function named feetToInch() that take feet as input and return value in inch.
    1. Write a function named exactly as centimeterToMeter(). It will take centimeter as input and return the result after converting that centimeter to meter.
    1. Write another function. The function name will be paperRequirements() and take three values as parameter. First parameter will be how many copy of first book will be printed, second parameter for the number of copies of second book and third parameter for the number of copy for the third book. Means, which book will be printed for how much copy will be given as parameter.
      Now notice carefully:
      -> First book needed 100 pages per copy.
      -> Second book needed 200 pages per copy.
      -> Third book needed 300 pages per copy.
      Now your task is to declare a function named paperRequirements(). Calling that function will tell how many copies of a book will be required as a parameter. Then the function will perform calculation of paper requirement for the print. And return the calculated number.
    1. Write a function named bestFriend() that take an array as parameter. That array contains the name of your friends. Now your work is to return the longest name from that function. Function will return the name or your friend as string.
    1. (This could be tricky.) There will be an array of numbers. You task is declare a function named onlyPositive() that will take that array as parameter and check each numbers of that array. If a number is positive then it will be stored in another array. If a number is negative then the loop will be stopped and return the new array until the loop stopped.
  • Try to solve by yourself. Take help from google if needed. If you are able to solve all the problems, CONGRATULATION!!! You have nothing to worry, you can go ahead. If you can solve 2 to 3 problems, you have to do hard work, try to understand better. But you can move forward by trying. If you can't solve any of the above, then you need to start in a new way from beginning.
  • Good Luck!!!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published