Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Grad points by javascript switch

// Total Number of Exam 100;
var bangla = 82;
switch (true) {
    case (bangla >= 80 && bangla <= 100):
        console.log("A+");
        break;
    case (bangla >= 70 && bangla < 80):
        console.log("A");
        break;
    case (bangla >= 60 && bangla < 70):
        console.log("A-");
        break;
    case (bangla >= 50 && bangla < 60):
        console.log("B");
        break;
    case (bangla >= 40 && bangla < 50):
        console.log("C");
        break;
    case (bangla >= 33 && bangla < 40):
        console.log("D");
        break;
    case (bangla >= 0 && bangla < 33):
        console.log("F");
        break;
    default:
        console.log("Please input a valid number")
}

//Output: A+
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to insert image in javascript code 
Javascript :: how to get the value of state of on and off 
Javascript :: cannot find module react scripts 
Javascript :: How to assign set a function as Variable 
Javascript :: react native star rating component 
Javascript :: date from = to 
Javascript :: destructuring interfaces in the most simple way <<Java Script 
Javascript :: How To Upload File To Alicloud OSS with node.js and Express 
Javascript :: NGX loading Interceptor 
Javascript :: Find speacific object from an array in javascript 
Javascript :: Add Navbar to React Redux CRUD App 
Javascript :: jquery scroll to top of element 
Javascript :: node.js core modules 
Javascript :: Reactjs exemple function component 
Javascript :: go-gitea/gitea 
Javascript :: react router 6 redirect 
Javascript :: mreact graph 
Javascript :: angular detect navigation change 
Javascript :: how to empty nodeList 
Javascript :: multi-line string shorthand javascript 
Javascript :: how to use classnames 
Javascript :: linux pupperteer 
Javascript :: get current user moralis web3 login 
Javascript :: react native asyncstorage mergeItem 
Javascript :: Return the N-th value of the Fibonacci sequence 
Javascript :: check trigger is human jquery 
Javascript :: javascript blur get new target 
Javascript :: how to add a key to every html tag in a list react 
Javascript :: automatically adjust color 
Javascript :: Get characters between two characters 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =