当前位置:网站首页>js用switch输出成绩是否合格
js用switch输出成绩是否合格
2022-06-27 07:20:00 【I am the sun?】
代码:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>switch成绩大于60合格,小于60不合格</title>
<script type="text/javascript">
var grade = +prompt("请输入成绩:");
switch(true){
case grade>=60 && grade <=100:
console.log("合格");
break;
case (grade >= 0 && grade <60):
console.log("不合格");
break;
default:
console.log("不在成绩范围内。。");
break;
}
</script>
</head>
<body>
</body>
</html>
运行结果:





边栏推荐
- 语音信号处理-概念(四):傅里叶变换、短时傅里叶变换、小波变换
- (已解决) MINet 进行测试时报错如下 raise NotImplementedError
- What is the difference between volatile and synchronized?
- The interviewer of a large front-line factory asked: do you really understand e-commerce order development?
- Window right click management
- guava 定时任务
- [openairinterface5g] rrcsetupcomplete for RRC NR resolution
- 程序人生 - 程序员三十五岁瓶颈你怎么看?
- Visual studio vs shortcut key usage
- Rust中的Pin详解
猜你喜欢

MySQL

Solve the problem of win10 wsl2 IP change

Talk about Domain Driven Design

js来打印1-100间的质数并求总个数优化版

Yolov6's fast and accurate target detection framework is open source

在线文本数字识别列表求和工具

One person manages 1000 servers? This automatic operation and maintenance tool must be mastered

程序人生 - 程序员三十五岁瓶颈你怎么看?

vs怎么配置OpenCV?2022vs配置OpenCV详解(多图)

Yarn create vite reports an error 'd:\program' which is neither an internal or external command nor a runnable program or batch file
随机推荐
R language analyzing wine data
云服务器配置ftp、企业官网、数据库等方法
1-4 decimal representation and conversion
Speech signal processing - concept (4): Fourier transform, short-time Fourier transform, wavelet transform
ggplot2的自定义调色板
Bean copy details
How can the flower e-commerce 2.0 era go after the breakthrough from 0 to 1?
Speech synthesis: tacotron explains [end-to-end speech synthesis model] [compared with traditional speech synthesis, it does not have complex phonetics and acoustic feature modules, but only uses < te
Websocket database listening
语音信号处理-概念(二):幅度谱(短时傅里叶变换谱/STFT spectrum)、梅尔谱(Mel spectrum)【语音的深度学习主要用幅度谱、梅尔谱】【用librosa或torchaudio提取】
js来打印1-100间的质数并求总个数优化版
Guava scheduled task
剑指 Offer 07. 重建二叉树
How torch. gather works
碎煤机crusher
js用switch语句根据1-7输出对应英文星期几
JDBC operation MySQL example
Guava tutorial collect some cases and write Google tool classes slowly
Speech signal processing - concept (I): time spectrum (horizontal axis: time; vertical axis: amplitude), spectrum (horizontal axis: frequency; vertical axis: amplitude) -- Fourier transform -- > time
PostgreSQL encounters permission denied in Windows system