What are the web front-end javascript exercises?
This article mainly explains the "web front-end javascript exercises", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "what are the web front-end javascript exercises" bar!
1. Write the function of summation, difference, product and quotient of any number
Train of thought analysis: first of all, find any number, so you need a formal parameter that can obtain the number and value of function transfer parameters: arguments, the method is different, the train of thought is for reference only.
Function F1 () {
Var sum=arguments [0], / / give the initial value of the first numeral to these variables respectively
Cha=arguments [0]
Ji=arguments [0]
Shang=arguments [0]
For (var iTunes 1)