GithubHelp home page GithubHelp logo

nachos's Introduction

简答题

一、下面代码的输出是什么,并简述原因。
let x = 1;
switch (x) {
  case '1':
    console.log(1);
    break;
  case 1:
    console.log(2);
    break;
  default:
    break;
}
二、请简述 throw 语句的作用和用法。
三、请列举传给 catch 语句块的参数 e 有哪些属性、属性的含义分别是什么。
try {

} catch (e) {
  // `e` 有哪些属性、属性的含义分别是什么
}

编程题

一、打印九九乘法表,输出结果如下:
                                1*1=1
                            1*2=2    2*2=4
                        1*3=3    2*3=6    3*3=9
                    1*4=4    2*4=8    3*4=12    4*4=16
                1*5=5    2*5=10    3*5=15    4*5=20    5*5=25
            1*6=6    2*6=12    3*6=18    4*6=24    5*6=30    6*6=36
        1*7=7    2*7=14    3*7=21    4*7=28    5*7=35    6*7=42    7*7=49
    1*8=8    2*8=16    3*8=24    4*8=32    5*8=40    6*8=48    7*8=56    8*8=64
1*9=9    2*9=18    3*9=27    4*9=36    5*9=45    6*9=54    7*9=63    8*9=72    9*9=81

注:整体输出为金字塔形,组和组之间的间距是 4 个空格。

二、小明在今年新年的第一天将 10000 元人民币存入银行,银行的利息为 8%。之后每年的最后一天小明会取出 1000 元。请编写程序,计算一下多少年小明就会清空他的帐户?

nachos's People

Contributors

wenquan0hf avatar

Watchers

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