NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Problem 1: Declare a variable called name and assign your name to it. Then, print "Hello, [your name]!" to the console.

Problem 2: Declare two variables, num1 and num2, and assign them any numerical values. Calculate their sum and print it to the console.

Problem 3: Create a variable called isRaining and set it to true. Write a conditional statement that prints "Take an umbrella" if it's raining and "No need for an umbrella" if it's not.

Problem 4: Declare a variable sentence and assign it a string containing your favorite quote. Print the sentence to the console.

Problem 5: Create a variable called age and set it to your age. Then, create another variable called futureAge and calculate what your age will be in 10 years. Print a sentence like "In 10 years, I will be [futureAge] years old."

Problem 6: Declare a variable radius and assign it a value. Calculate and print the area of a circle with that radius.

Problem 7: Declare a variable temperature and assign a value in Celsius. Convert it to Fahrenheit and print both the Celsius and Fahrenheit temperatures.

Problem 8: Create a variable num and assign it a number. Write a conditional statement to determine if the number is even or odd and print the result.

Problem 9: Declare three variables: firstName, lastName, and fullName. Set firstName and lastName to your first and last name, respectively. Combine them to create fullName and print it.

Problem 10: Create a variable isLoggedIn and set it to true. If the user is logged in, print "Welcome, User!" to the console. If not, print "Please log in."

Problem 11: Declare a variable myArray and assign it an array of your favorite colors. Print the second color in the array.

Problem 12: Create a variable numArray containing an array of numbers. Calculate and print the sum of all the numbers in the array.

Problem 13: Declare a variable str and assign it a string. Write code to print the length of the string.

Problem 14: Create a variable hours and assign a number of hours. Convert it to minutes and print both the hours and minutes.

Problem 15: Declare an array called fruits with some fruit names. Use a loop to print each fruit in the array on a separate line.

Problem 16: Create a variable userInput and ask the user to input their name using the prompt function. Print a greeting using their name.

Problem 17: Declare an object person with properties name, age, and city. Print each property.

Problem 18: Create a variable price and assign it a number. Apply a 10% discount and print the discounted price.

Problem 19: Declare an array numbers with a series of numbers. Use a loop to find and print the largest number in the array.

Problem 20: Create a variable isLeapYear and write a program that checks whether a given year is a leap year. Print the result.
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.