-
Notifications
You must be signed in to change notification settings - Fork 1
/
settimeout.js
64 lines (43 loc) · 1.21 KB
/
settimeout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// /*
const { toInteger } = require("lodash");
// const students=[
// {name : "naveen",age:35},
// {name : "jayashree", age : 29}
// ]
// function enrollStudents(details,fetchStudents){
// setTimeout(function(){
// students.push(details);
// console.log("Student enrolled");
// },1000)
// fetchStudents();
// }
// function fetchStudents(){
// setTimeout(function(){
// console.log("fetching the details of students");
// console.log(students);
// },2000);
// }
// enrollStudents({name:"vijay",age:50},fetchStudents);
// */
// //assignment
// // setTimeout(() => {
// // functioncall();
// // },10000);
// var IntervalId= setInterval(() =>{
// let i=1;
// for( ;i<=10;i++)
// console.log(i);
// // if(i===11)
// clearInterval(IntervalId);
// }, 5000);
// function functioncall(){
// // console.log("called function after 10 sec");
// }
// console.log(1000*0.1, typeof(Number("1000")));
console.log(toInteger("000002"));
var str = "SPK000004";
var res = str.replace(/\D/g, "");
console.log(res, ); // gives 0000004
console.log("spk"+"00001");
yes=toString(00001);
console.log(yes);