The sixth practice

JavaScript Quiz

What is NaN, what type it is? How to test whether a value equal to NaN?

NaN is Not a Number Abbreviation, JavaScript is a special value, which is a type of Number, a value can be determined by isNaN (param) whether NaN:

console.log(isNaN(NaN)); //true
console.log(isNaN(23)); //false
console.log(isNaN('ds')); //true
console.log(isNaN('32131sdasd')); //true
console.log(NaN === NaN); //false
console.log(NaN === undefined); //false
console.log(undefined === undefined); //false
console.log(typeof NaN); //number

 


MySQL quiz

drop, delete and truncate the difference?

The same point:
TRUNCATE, and the Delete to delete the data in the table will drop
different points:
1, TRUNCATE, drop a DDL statement is automatically committed after execution. delete DML statement is not automatically submitted.
2, delete (not free up space) and truncate (free space) deletes only the data without deleting the table structure. structure and data drop will delete tables, free up space.
3, speed: drop "truncate" delete


Java programming problem

A sequence Score: 2 / 1,3 / 2,5 / 3,8 / 5,13 / 8,21 / 13 ... and this calculated front 20 of the series.

public  class TL10 {
     public  static  void main (String [] args) {
         // definition of the sum of the denominator, molecules, temporary storage variable denominator   
        Double SUM = 0, H = 2, K =. 1, TEMP = 0 ;  
         for ( Double I . 1 =; I <= 20 is; I ++ ) {   
            sUM + = H / K;   
            TEMP = H;   
            H = H + K;   
            K = TEMP;   
        }       
        System.out.println ( "before the number of columns 20 and the sum:" + SUM);   
    } 
}

 

Guess you like

Origin www.cnblogs.com/czh518518/p/11305384.html