Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. // console.log("Hello");
  2. // let x = 10;
  3. // console.log(x);
  4. // x="hello";
  5. // console.log(x);
  6. //////////////////////////
  7. // let x = -5;
  8. // if(x>0){
  9. // console.log("+");
  10. // }
  11. // else if(x==0){
  12. // console.log("0");
  13. // }
  14. // else {
  15. // console.log("-");
  16. // }
  17. //////////////////////////////
  18. // let i = 0;
  19. // let n =10;
  20.  
  21. // while(i<n){
  22. // console.log(i);
  23. // i++;
  24. // }
  25.  
  26. // for (let j = 0; j < n; j++) {
  27. // console.log(j);
  28.  
  29. // }
  30. //////////////////////////////////
  31.  
  32. //1*2*3*4*5 = 5!
  33.  
  34. // let n = 5;
  35. // let res = 1;
  36. // for (let index = 2; index <= n; index++) {
  37. // res=res*index;
  38.  
  39. // }
  40. // console.log(res);
  41.  
  42. ////////////////////////////////////
  43.  
  44. // let a = 2;
  45. // let b = 10;
  46. // let res = 1;
  47. // for (let index = 1; index <= b; index++) {
  48. // res=res*a;
  49.  
  50. // }
  51. // console.log(res);
  52. ///////////////////////////////////////////////
  53. //////////////////////////////////////////////////
  54. //let marks = [5,4,3,4,5,4,2,3];
  55. //console.log(marks[2]);
  56. // for (let i = 0; i <marks.length; i++) {
  57. // console.log(marks[i]);
  58.  
  59. // }
  60. ///////////////////////////////////////////////////////
  61. // let sum = 0;
  62. // for (let i = 0; i < marks.length; i++) {
  63. // sum = sum+marks[i];
  64. // }
  65.  
  66. // console.log(sum/marks.length);
  67. ///////////////////////////////////////////////////////
  68. // function func(str){
  69. // //console.log("hello "+str);
  70.  
  71. // return "hello "+str;
  72. // }
  73.  
  74. // console.log(func("Vasya"));
  75.  
  76. // func("Petya");
  77. // func("Kolya");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement