Thanks for clearance I’ve been asking myself even my friends when and where to apply a certain loop method on projects. Then today am the one who’s gonna help others on that one. Watching different tutorials with different developers helps me a lot because I learn 10 times more than at school.
For outputing a range of numbers divisible by 3 you dont need that condition (i%3===0). You can simply increment the 'i' in your for loop by 3 and get same result. ie: - for(let i = 0; i < 100; i += 3){ console.log(i) }
Thanks Navin!! Here are Positive order loop i wrote. let x=56789 let y=10000 while(y>=1)//Positive order { z=parseInt(x/y) console.log(parseInt(z%10)) y=y/10; }
Sir this is a great playlist, but it's been 1 month and the video is still covering javascript basic syntax. Please proceed with the web part soon, really looking forward to it from you :)
by learning JS from here, can we become more familiar with development using js? and this playlist covers all the advanced points which a programmer should known for development ?? kindly help anyone
let num = 321; let reverse = 0; while(num>0) { let remainder= num % 10; reverse = reverse *10 + remainder; num = parseInt(num/10); } console.log(reverse);
Thanks for this amazing series !! The answer for the assignment at 6:34 is let num = 4567; let rev = 0; while(num > 0) { rev = rev*10 + (num%10) num = parseInt(num /10) } console.log(rev) //7654
// Reversing a number let num = 123456; let rev = 0; let rightDigit = 0; while (num > 0) { rightDigit = parseInt(num % 10); rev = rev * 10 + rightDigit; num = Math.floor(num / 10); } console.log(rev);
Very nice series Sir ... Hope you will cover till advanced of JavaScript, One request sir ... please make a dedicated series on DevOps ... Website Deployment, Docker, Kubernetes, Jenkins, Especially Azure or AWS please sir ...
if we divide 123456 by 10, then the output is 12345.6. But in video percentage symbol (%) is used. The % symbol gives the remainder when 123456 is divided by 10. In this case, the output is 6.
I have deleted node js and I know c++ so I answered questions answer in c++ #include int main(int argc, char *argv[]) { int num=252257; int num2=1; while(num>0){ int lastDigit=num%10; num2=num2*10+lastDigit; num/=10; } std::cout
let num = 12345 let digit = 0 let reversedDigit = "" while(num > 0){ digit = num % 10 num = parseInt(num / 10) reversedDigit = reversedDigit + String(digit) } console.log(`The reverse number is: ${reversedDigit}`)
**Not the assignment** splitting the number in the same order not in the reverse order as shown in the video. let r=564782; t=100000; while(r>0) { a=parseInt(r/t); k=parseInt(r%t); console.log(a); t=t/10; r=k; }
let num = 16548765412; let arr = []; let q = 1; while(q>=1) { r = num % 10; q = num / 10; num=Math.floor(q); arr.push(r) } len = arr.length while(len>=0) { console.log(arr[len]) len-- }
the answer is :
let num = 123456;
let num2="0";
while(num>0)
{
let remainder=num%10;
num2=num2*10+remainder;
num=parseInt(num/10);
}
console.log(num2);
Time stamp 1:14 //numbers 1 to 100 that are divisible by 3
let count = 0; // to contain how many numbers are divisible by three
for (let i = 1; i
Assignment:
let num = 123456;
let num2 = 0;
while(num>0)
{
let num1= num % 10;
num2 = num2 *10 + num1;
num = parseInt(num/10);
}
console.log(num2);
Answer 6:25
//Made by Anmol main
let value = 564782
let rev
while (value) {
rev = value % 10;
value = parseInt(value / 10)
console.log(rev);
}
Didn't get it there is no condition in while
@@nihaltiwari3474 yes
HW:
let num = 564782, num2 = 0;
while(num > 0)
{
num2 = (num2 * 10) + (num % 10);
num = parseInt(num / 10);
}
console.log(num2);
Once Again Thanks Navin sir
//6:40 (assignment)
let num = 1234;
let num2= "0";
while(num>0)
{
let remainder = num%10;
num = parseInt(num/10);
num2= String (num2 + remainder);
}
console.log(Number(num2)); // output is 4321
Super bro with string concatenation
you are smart
Output will be :04321
Because you have assigned num2 = "0"
let num2= "0"; exchange let num2 ='"". if let num2 ="0" output is 04321
>>6:16 Answer0)
{
value=num%10;
temp=10*temp+value;
num=parseInt(num/10);
}
console.log(temp);
Answer at 6:18 time stamp
let rev = 0;
let num = 12345;
rev = Number(String(num).split(' ').reverse( ).join(' '));
console.log(rev);
ouput is
54321
Thanks for clearance I’ve been asking myself even my friends when and where to apply a certain loop method on projects. Then today am the one who’s gonna help others on that one. Watching different tutorials with different developers helps me a lot because I learn 10 times more than at school.
For outputing a range of numbers divisible by 3 you dont need that condition (i%3===0). You can simply increment the 'i' in your for loop by 3 and get same result. ie: -
for(let i = 0; i < 100; i += 3){
console.log(i)
}
i = 1
bro how can one get rid of the zero in the output
@@Bob0126-k9j use a condition eg if i > 0
assignment:-
let num = 28374983;
let reverse = "";
while (num > 0) {
console.log(num % 10);
reverse += num % 10;
num = parseInt(num / 10);
}
convert = parseInt(reverse);
console.log(convert, typeof convert);
Thanks
ANSWER FOR 1:14
for(let i=1;i
at 1:19
for(let i = 1; i
6:16 assignment
let num = 564782, num2 = 0;
while(num > 0)
{
console.log((num2 * 10) + (num % 10));
num = parseInt(num / 10);
}
console.log(num2);
output comes as expected vertically
Thanks Navin!!
Here are Positive order loop i wrote.
let x=56789
let y=10000
while(y>=1)//Positive order
{
z=parseInt(x/y)
console.log(parseInt(z%10))
y=y/10;
}
numbers divisible by 3 for(int i = 3;i
Time stamp 1:14
for (let i=1; i
Best teacher on youtbe, Kudos to navin sir
last question
let num1=3927193
num2=""
while (0
1:13
I don't have my computer right now so I am just explaining it
if i is % 3 and === 0 than console.log
Peace out ✌️
Timeline:1:20
for(let i=1;i
We will use if statement in for loop and condition is if(i%3==o) then print the value of i
let num = 398595
let rev = ""
while(num>0)
{
let rem=num%10
rev=String(rev)+String(rem)
num=parseInt(num/10)
}
console.log(rev);
assignment
small change inside ur code while loop
num2 = num2*10;
num2 += num1℅10;
a very well known in C and C++...
while(num > 0)
{
ld = num % 10;
rev = rev*10 + ld;
num = num / 10;
}
1:08
let num;
for(let i=1;i
Sir this is a great playlist, but it's been 1 month and the video is still covering javascript basic syntax. Please proceed with the web part soon, really looking forward to it from you :)
Noo, these basics are used everywhere
Hello bro I am manoj from Hyderabad(Telengana) could please suggest me that how can I improve my communication skills like you.Could we have some talk
1.19 // print the number divided by 3 between 1 to 100
for (let i = 1; i
let num = 56782;
let num2=0;
while(num>0)
{
console.log(num%10);
num= parseInt(num/10);
}
console.log(num2)
my answer for the homework at the end
by learning JS from here, can we become more familiar with development using js? and this playlist covers all the advanced points which a programmer should known for development ?? kindly help anyone
let num = 321;
let reverse = 0;
while(num>0)
{
let remainder= num % 10;
reverse = reverse *10 + remainder;
num = parseInt(num/10);
}
console.log(reverse);
can we add && operator to for loop?
assignment:
let num = 564782
let num2 = 0
let exponent = 5
while(num>0)
{
num2 += (num%10) * 10**(exponent);
num = parseInt(num/10);
exponent--;
}
console.log(num2)
In String->
let num=12345;
let num2="";
while(num>0){
num2+=String(num%10);
num=parseInt(num/10);
}
console.log(num2);
The mystey is solved...😂. Thx mate
Thanks for this amazing series !!
The answer for the assignment at 6:34 is
let num = 4567;
let rev = 0;
while(num > 0) {
rev = rev*10 + (num%10)
num = parseInt(num /10)
}
console.log(rev) //7654
nice. could you explain the logic?
my forloop never gets xecuted i need help
You are going to make a video on Dom or not
please tell about best books for javascript
// Reversing a number
let num = 123456;
let rev = 0;
let rightDigit = 0;
while (num > 0) {
rightDigit = parseInt(num % 10);
rev = rev * 10 + rightDigit;
num = Math.floor(num / 10);
}
console.log(rev);
Sir, please make videos on Artificial intelligence and machine learning
Very nice series Sir ... Hope you will cover till advanced of JavaScript, One request sir ... please make a dedicated series on DevOps ... Website Deployment, Docker, Kubernetes, Jenkins, Especially Azure or AWS please sir ...
Nice explanation
for(i = 0; i
Please make a video on java interview questions for freshers
2:52 how did you come with divide 123456 by 10 to get 6?
@telusko
if we divide 123456 by 10, then the output is 12345.6. But in video percentage symbol (%) is used. The % symbol gives the remainder when 123456 is divided by 10. In this case, the output is 6.
Very nice explaination.
/*digits of an integer --using java */
import java.util.*;
public class SampleClass {
public static void main(String[]arg) {
Scanner scr=new Scanner(System.in);
System.out.println("enter the number");
int n=scr.nextInt();
digitinteger(n);
}
static void digitinteger(int n) {
int arr[]=new int[100];
int i=0;
int r=0;
while(n>0) {
r=n%10;
arr[i]=r;
i++;
n=n/10;
}
for(int j=i-1;j>=0;j--) {
System.out.println(arr[j]);
}
}
}
Reverse Output
let reverseNum = 564782;
let stringNum = reverseNum.toString();
for(let i=0; i< stringNum.length; i++){
let reversed = parseInt(stringNum[i])
console.log(reversed);
}
let num = 564782
let num2 = 0
while ( num > 0 ) {
console.log(num % 10 );
num = parseInt(num / 10 )
num2 = num
}
Do while loop
Sir what software you used edit video
I have deleted node js and I know c++ so I answered questions answer in c++
#include
int main(int argc, char *argv[])
{
int num=252257;
int num2=1;
while(num>0){
int lastDigit=num%10;
num2=num2*10+lastDigit;
num/=10;
}
std::cout
let num = 12345
let digit = 0
let reversedDigit = ""
while(num > 0){
digit = num % 10
num = parseInt(num / 10)
reversedDigit = reversedDigit + String(digit)
}
console.log(`The reverse number is:
${reversedDigit}`)
Anna vedios continue chey anna..🥲
**Not the assignment** splitting the number in the same order not in the reverse order as shown in the video.
let r=564782;
t=100000;
while(r>0)
{
a=parseInt(r/t);
k=parseInt(r%t);
console.log(a);
t=t/10;
r=k;
}
this is the best method, i have also doing this straight numbers in same orders. thanks for the code.
let num = 123456
for(;num>0;)
{
console.log(num%10)
num = parseInt(num /10)
}
The for loop still woked
I want to know one thing even without let why js works
The reverse of the given Number code:
let num=564782
let Str=""
while(num>0){
Str+=String(num%10)
num=parseInt(num/10)
}
console.log(Str)
let num =123456;
let num2=0;
while(num>0)
{
let rem = num%10;
num2 = num2*10+rem;
num = parseInt(num/10);
}
console.log(num2);
Nice your explanation is amazing sir, and am a fan of you.
let num = 123456;
let num2 = 0;
while(num>0){
q = num / 10;
r = num % 10;
num = parseInt(q);
num2 = (num2*10) + r;
}
console.log(num2)
Hi my friend
"Yesterday is history".
"Tomorrow is mystery".
"Today is a gift ".
"That's why is called present😎✌️🤟"
Very very very nice bro
Good stuff
Thanks.
I mean bro you're just cool
Super 👍
let num = 123456789
let num2 = ""
while(num>0){
output = String(num%10)
num2 = num2 + output
num = parseInt(num/10)
}
console.log(num2)
1st view and comment
Ist viewer and first liker
Your examples in this presentation are just too complicated. Keep it simple man.
hindi bolo
num = 1234
let reverse = 0
while (num>0)
{
reverse = reverse*10+(num%10);
num = parseInt(num / 10);
}
console.log(reverse);
does anyone know why
console.log(num%10) print 6?
because % returns the remainder value so, when you do 123456 / 10, remainder would be 6.
let num1 = 28405
let num2 = 0
while(num1>0){
num2 = num2*10 + num1%10
console.log(num1%10);
num1 = parseInt(num1/10)
}
console.log(num2);
let num = 16548765412;
let arr = [];
let q = 1;
while(q>=1)
{
r = num % 10;
q = num / 10;
num=Math.floor(q);
arr.push(r)
}
len = arr.length
while(len>=0)
{
console.log(arr[len])
len--
}
for (let i = 1; i
for(let i=1, i
let newNum = 0;
let num = 1234;
while (num > 0) {
newNum = (num % 10) + (newNum * 10);
num = parseInt(num / 10);
}
console.log(newNum)
for(let i=1;i
let num = 1
for(let i=1;i
for(let x= 0; x
for(let i = 1; i
for(i=1;i
for (i = 1; i
for (let i = 1; i
for odd numbers
for (let i = 0; i
Why use parseInt and not math.floor
?
for(let i = 0; i
let num=1234;
let sum=0;
let rem=0;
while(num>0)
{
rem=num%10;
sum=sum*10+rem;
num=num/10;
}
console.log(sum); //4321
for (let i = 1; i