What is "else if" in programming?

This is a recommends products dialog
Top Suggestions
Starting at
View All >
Language
French
English
ไทย
German
繁體中文
Country
Hi
All
Sign In / Create Account
language Selector,${0} is Selected
Register & Shop at Lenovo Pro
Register at Education Store

Pro Tier Benefits

• Save up to an extra 5% on Think everyday pricing
• Spend ฿250,000 advance to Plus Tier with increased benefits

Plus Tier Benefits

• Save up to an extra 8% on Think everyday pricing
• Spend ฿750,000, advance for free to Elite Tier with increased benefits
• Take advantage of flexible payment options with TruScale Device as a Service.

Elite Tier Benefits

• Save up to an extra 12% on Think everyday pricing
• Take advantage of flexible payment options with
TruScale Device as a Service.
Reseller Benefits
• Access to Lenovo's full product portfolio
• Configure and Purchase at prices better than Lenovo.com
View All Details >
more to reach
PRO Plus
PRO Elite
Congratulations, you have reached Elite Status!
Pro for Business
Delete icon Remove icon Add icon Reload icon
TEMPORARILY UNAVAILABLE
DISCONTINUED
Temporary Unavailable
Cooming Soon!
. Additional units will be charged at the non-eCoupon price. Purchase additional now
We're sorry, the maximum quantity you are able to buy at this amazing eCoupon price is
Sign in or Create an Account to Save Your Cart!
Sign in or Create an Account to Join Rewards
View Cart
Wow, your cart is empty!
Remove
items in cart
Fill it in with great deals
Some items in your cart are no longer available. Please visit cart for more details.
has been deleted
Please review your cart as items have changed.
of
Contains Add-ons
Proceed to Checkout
Yes
No
Popular Searches
What are you looking for today ?
Trending
Recent Searches
Hamburger Menu
skip to main content
{"arrowColor":"#000000","backgroundColor":"#e6f4fa","sideMsg":{"t_id":"","language":{"th":"","en_th":"","en":"","th_th":""},"id":""},"data":[{"pcInfo":"","mAndTabInfo":"","bannerInfo":{"t_id":"Pagedc72c053-5a07-4681-ad57-e7734854cfe4","language":{"th":"","en_th":"%3Cp%20style%3D%22text-wrap%3A%20wrap%3B%22%3E%3Cstrong%3E%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3EPurchase%20any%20PC%20with%20your%20Lenovo%20Pro%20Business%20account%20and%20enjoy%20up%20to%2020%25%20off%20your%20next%20purchase%20of%20selected%20accessories.%3C%2Fp%3E%3Cp%20style%3D%22text-wrap%3A%20wrap%3B%22%3E%3Ca%20href%3D%22https%3A%2F%2Faccount.lenovo.com%2Fth%2Flenovopro%2Fen%2Fsmbaccount%2Fgatekeeper%2Fshowpage%3FipromoID%3Dhellobar_01_lpro%22%20target%3D%22_self%22%20style%3D%22text-decoration%3A%20underline%3B%20color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3EJoin%20Lenovo%20Pro%20FREE%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fp%3E","en":"","th_th":"%3Cp%3E%3Cstrong%3E%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD%E0%B8%9E%E0%B8%B5%E0%B8%8B%E0%B8%B5%E0%B8%97%E0%B8%B8%E0%B8%81%E0%B8%A3%E0%B8%B8%E0%B9%88%E0%B8%99%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2%E0%B8%9A%E0%B8%B1%E0%B8%8D%E0%B8%8A%E0%B8%B5%20Lenovo%20Pro%20Business%20%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%84%E0%B8%B8%E0%B8%93%20%E0%B8%A3%E0%B8%B1%E0%B8%9A%E0%B8%AA%E0%B9%88%E0%B8%A7%E0%B8%99%E0%B8%A5%E0%B8%94%E0%B8%96%E0%B8%B6%E0%B8%87%2020%25%20%E0%B9%83%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B8%B1%E0%B9%88%E0%B8%87%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD%E0%B8%AD%E0%B8%B8%E0%B8%9B%E0%B8%81%E0%B8%A3%E0%B8%93%E0%B9%8C%E0%B9%80%E0%B8%AA%E0%B8%A3%E0%B8%B4%E0%B8%A1%E0%B8%84%E0%B8%A3%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%95%E0%B9%88%E0%B8%AD%E0%B9%84%E0%B8%9B%3C%2Fp%3E%3Cp%3E%3Ca%20href%3D%22https%3A%2F%2Faccount.lenovo.com%2Fth%2Flenovopro%2Fth%2Fsmbaccount%2Fgatekeeper%2Fshowpage%3FipromoID%3Dhellobar_01_lpro%22%20target%3D%22_self%22%20style%3D%22text-decoration%3A%20underline%3B%20color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3E%E0%B8%AA%E0%B8%A1%E0%B8%B1%E0%B8%84%E0%B8%A3%20Lenovo%20Pro%20%E0%B8%9F%E0%B8%A3%E0%B8%B5%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fp%3E"},"id":"Pagedc72c053-5a07-4681-ad57-e7734854cfe4"},"gInfo":""},{"pcInfo":"","mAndTabInfo":"","bannerInfo":{"t_id":"Page3d3c2275-04e7-4d4d-ad41-9717236214ce","language":{"th":"","en_th":"%3Cp%20style%3D%22text-wrap%3A%20wrap%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3E%3C%2Fstrong%3E%3C%2Fspan%3EBack%20to%20School%20%7C%20Save%20up%20to%20an%20EXTRA%208%25%20on%20select%20PCs!%20Plus%2C%20THB3%2C800%20off%20welcome%20discount.%26nbsp%3B%3C%2Fp%3E%3Cp%20style%3D%22text-wrap%3A%20wrap%3B%22%3E%3Ca%20href%3D%22%2Fd%2Fschool-from-home%2F%3FipromoID%3DHellobar_02_edu_cat1%22%20target%3D%22_self%22%20textvalue%3D%22Shop%20Now%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3EShop%20Now%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%20%7C%26nbsp%3B%26nbsp%3B%3Ca%20href%3D%22https%3A%2F%2Fwww.lenovo.com%2Fth%2Fedu%2Fthedu%2Fen%2Flogin%2Fedu%2F%3FipromoID%3DHellobar_02_edu_cat2%22%20target%3D%22_self%22%20textvalue%3D%22Sign%20Up%20%2F%20Sign%20In%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cstrong%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3ESign%20Up%20%2F%20Sign%20In%3C%2Fspan%3E%3C%2Fstrong%3E%3C%2Fa%3E%3C%2Fp%3E","en":"","th_th":"%3Cp%3E%E0%B9%80%E0%B8%9B%E0%B8%B4%E0%B8%94%E0%B9%80%E0%B8%97%E0%B8%AD%E0%B8%A1%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%20%7C%20%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%AB%E0%B8%A2%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%9E%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%9E%E0%B8%B4%E0%B9%80%E0%B8%A8%E0%B8%A9%E0%B8%96%E0%B8%B6%E0%B8%87%208%25%20%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%9E%E0%B8%B5%E0%B8%8B%E0%B8%B5%E0%B8%9A%E0%B8%B2%E0%B8%87%E0%B8%A3%E0%B8%B8%E0%B9%88%E0%B8%99!%E0%B9%81%E0%B8%96%E0%B8%A1%E0%B8%AA%E0%B9%88%E0%B8%A7%E0%B8%99%E0%B8%A5%E0%B8%94%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%99%E0%B8%A3%E0%B8%B1%E0%B8%9A%E0%B8%AD%E0%B8%B5%E0%B8%81%20THB3%2C800%26nbsp%3B%3C%2Fp%3E%3Cp%3E%3Ca%20href%3D%22%2Fd%2Fschool-from-home%2F%3FipromoID%3DHellobar_02_edu_cat1%22%20target%3D%22_self%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3E%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD%E0%B9%80%E0%B8%A5%E0%B8%A2%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%20%7C%20%3C%2Fspan%3E%3Ca%20href%3D%22https%3A%2F%2Fwww.lenovo.com%2Fth%2Fedu%2Fthedu%2Fen%2Flogin%2Fedu%2F%3FipromoID%3DHellobar_02_edu_cat2%22%20target%3D%22_self%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3E%E0%B8%A5%E0%B8%87%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%AA%E0%B8%A1%E0%B8%B1%E0%B8%84%E0%B8%A3%2F%E0%B8%A5%E0%B8%87%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B9%80%E0%B8%82%E0%B9%89%E0%B8%B2%E0%B9%83%E0%B8%8A%E0%B9%89%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fp%3E"},"id":"Page3d3c2275-04e7-4d4d-ad41-9717236214ce"},"gInfo":""},{"pcInfo":"","mAndTabInfo":"","bannerInfo":{"t_id":"Page853d1d8e-0632-4085-ac42-9dcc85c7725c","language":{"th":"","en_th":"%3Cp%3ENew%20Arrivals%20%7C%20Explore%20latest%20PC%20deals%20from%20ThinkPad%2C%20Yoga%2C%20Legion%20and%20more!%26nbsp%3B%26nbsp%3B%3Ca%20href%3D%22%2Fd%2Fdeals%2Fnew-arrival%2F%3FipromoID%3Dhellobar_New_Arrivals%22%20target%3D%22_self%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3EAll%20New%20Arrivals%3C%2Fstrong%3E%3C%2Fa%3E%3C%2Fp%3E","en":"","th_th":"%3Cp%3E%E0%B8%AA%E0%B8%B4%E0%B8%99%E0%B8%84%E0%B9%89%E0%B8%B2%E0%B8%A1%E0%B8%B2%E0%B9%83%E0%B8%AB%E0%B8%A1%E0%B9%88%20%7C%20%E0%B9%80%E0%B8%A2%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A1%E0%B8%8A%E0%B8%A1%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B9%80%E0%B8%AA%E0%B8%99%E0%B8%AD%E0%B8%9E%E0%B8%B5%E0%B8%8B%E0%B8%B5%E0%B8%A5%E0%B9%88%E0%B8%B2%E0%B8%AA%E0%B8%B8%E0%B8%94%E0%B8%88%E0%B8%B2%E0%B8%81%20ThinkPad%2C%20Yoga%20%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%AD%E0%B8%B7%E0%B9%88%E0%B8%99%E0%B9%86%E0%B8%AD%E0%B8%B5%E0%B8%81%E0%B8%A1%E0%B8%B2%E0%B8%81%E0%B8%A1%E0%B8%B2%E0%B8%A2%26nbsp%3B%20%26nbsp%3B%3Ca%20href%3D%22%2Fd%2Fdeals%2Fnew-arrival%2F%3FipromoID%3Dhellobar_New_Arrivals%22%20target%3D%22_self%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3E%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD%E0%B9%80%E0%B8%A5%E0%B8%A2%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fp%3E"},"id":"Page853d1d8e-0632-4085-ac42-9dcc85c7725c"},"gInfo":""},{"pcInfo":"","mAndTabInfo":"","bannerInfo":{"t_id":"Pageee2f534f-2761-4d0d-a6ea-cf2c11d01c52","language":{"th":"","en_th":"%3Cp%3E%3Cspan%20style%3D%22text-wrap%3A%20nowrap%3B%22%3EReady%2C%20set%2C%20grab%20your%20PC%20in%26nbsp%3B%20with%20Free%20shipping%20sitewide%2C%20no%20minimum%20Spend.%26nbsp%3B%3C%2Fspan%3E%3C%2Fp%3E%3Cp%3E%3Cspan%20style%3D%22text-wrap%3A%20nowrap%3B%22%3ECall%201800-011-936.%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3Ca%20href%3D%22%2Fd%2Fdeals%2Fexpress%2F%3FipromoID%3Dhellobar_04_quickship%22%20target%3D%22_blank%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cspan%20style%3D%22text-wrap%3A%20nowrap%3B%20color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3EShop%20Now%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fspan%3E%3C%2Fp%3E","en":"","th_th":"%3Cp%3E%3Cspan%20style%3D%22text-wrap%3A%20nowrap%3B%22%3E%E0%B8%A3%E0%B8%B0%E0%B8%A7%E0%B8%B1%E0%B8%87%20%E0%B9%80%E0%B8%95%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%A1%E0%B8%95%E0%B8%B1%E0%B8%A7%20%E0%B8%84%E0%B8%A7%E0%B9%89%E0%B8%B2%E0%B8%9E%E0%B8%B5%E0%B8%8B%E0%B8%B5%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%84%E0%B8%B8%E0%B8%93%20%E0%B8%88%E0%B8%B1%E0%B8%94%E0%B8%AA%E0%B9%88%E0%B8%87%E0%B8%9F%E0%B8%A3%E0%B8%B5%E0%B8%97%E0%B8%B8%E0%B8%81%E0%B8%84%E0%B8%B3%E0%B8%AA%E0%B8%B1%E0%B9%88%E0%B8%87%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD%20%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%A1%E0%B8%B5%E0%B8%A2%E0%B8%AD%E0%B8%94%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B9%88%E0%B8%B3%26nbsp%3B%3C%2Fspan%3E%3C%2Fp%3E%3Cp%3E%3Cspan%20style%3D%22text-wrap%3A%20nowrap%3B%22%3E%E0%B9%82%E0%B8%97%E0%B8%A3%201800-011-936%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3Ca%20href%3D%22%2Fd%2Fdeals%2Fexpress%2F%3FipromoID%3Dhellobar_04_quickship%22%20target%3D%22_blank%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cstrong%3E%3Cspan%20style%3D%22text-wrap%3A%20nowrap%3B%20color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD%E0%B9%80%E0%B8%A5%E0%B8%A2%3C%2Fspan%3E%3C%2Fstrong%3E%3C%2Fa%3E%3C%2Fspan%3E%3C%2Fp%3E"},"id":"Pageee2f534f-2761-4d0d-a6ea-cf2c11d01c52"},"gInfo":""},{"pcInfo":"","mAndTabInfo":"","bannerInfo":{"t_id":"Pagefff05e60-6f8a-4015-aed9-ea33f3571c46","language":{"th":"","en_th":"%3Cp%3E%3Cstrong%3E%3C%2Fstrong%3E%3C%2Fp%3E%3Cp%3EYoga%20Slim%207i%20(14%26%2339%3B%26%2339%3B%2C%20Gen%209)%7CUnlock%20seamless%20AI-powered%20creativity%20with%20Intel%C2%AE%20Core%E2%84%A2%20Ultra%20processors%20in%20a%20thin%2C%20light%20design%20with%20epic%20battery%20life.%26nbsp%3B%26nbsp%3B%3Ca%20href%3D%22%2Fp%2Flaptops%2Fyoga%2Fyoga-slim-series%2Fyoga-slim-7i-gen-9-aura-edition-15-inch-intel%2Flen101y0051%3FipromoID%3Dhellobar_05_Yoga_Slim_7i_Gen_9%22%20target%3D%22_self%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3EShop%20Now%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fp%3E","en":"","th_th":"%3Cp%3EYoga%20Slim%207i%20(14%26%2339%3B%26%2339%3B%2C%20Gen%209)%7C%E0%B8%9B%E0%B8%A5%E0%B8%94%E0%B8%A5%E0%B9%87%E0%B8%AD%E0%B8%84%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%84%E0%B8%B4%E0%B8%94%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B8%A3%E0%B8%84%E0%B9%8C%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%82%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%84%E0%B8%A5%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%99%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2%20AI%20%E0%B9%84%E0%B8%94%E0%B9%89%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%A3%E0%B8%B2%E0%B8%9A%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%99%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2%E0%B8%82%E0%B8%B8%E0%B8%A1%E0%B8%9E%E0%B8%A5%E0%B8%B1%E0%B8%87%20Intel%C2%AE%20Core%E2%84%A2%20Ultra%20%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%94%E0%B8%B5%E0%B9%84%E0%B8%8B%E0%B8%99%E0%B9%8C%E0%B8%9A%E0%B8%B2%E0%B8%87%E0%B9%80%E0%B8%9A%E0%B8%B2%E0%B8%9E%E0%B8%A3%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%AD%E0%B8%B2%E0%B8%A2%E0%B8%B8%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B9%81%E0%B8%9A%E0%B8%95%E0%B9%80%E0%B8%95%E0%B8%AD%E0%B8%A3%E0%B8%B5%E0%B9%88%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%B2%E0%B8%A7%E0%B8%99%E0%B8%B2%E0%B8%99%26nbsp%3B%20%26nbsp%3B%3Ca%20href%3D%22%2Fp%2Flaptops%2Fyoga%2Fyoga-slim-series%2Fyoga-slim-7i-gen-9-aura-edition-15-inch-intel%2Flen101y0051%3FipromoID%3Dhellobar_05_Yoga_Slim_7i_Gen_9%22%20target%3D%22_self%22%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%20text-decoration%3A%20underline%3B%22%3E%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%200)%3B%22%3E%3Cstrong%3E%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD%E0%B9%80%E0%B8%A5%E0%B8%A2%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3Cstrong%3E%3C%2Fstrong%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fp%3E"},"id":"Pagefff05e60-6f8a-4015-aed9-ea33f3571c46"},"gInfo":""}],"autoRun":true,"displayTerminal":"pc,tablet,mobile"}
 


What is "else if" in programming?

In programming, "else if" is a conditional statement that allows you to specify multiple conditions to be evaluated in a sequence. It is used when you have more than two possible outcomes for a decision.

How does the "else if" statement work?

When you use the "else if" statement, the program checks the condition associated with it. If the condition is true, the corresponding block of code is executed. If the condition is false, the program moves on to the next "else if" statement or the "else" statement, if present.

What happens if none of the conditions in the "else if" statement are true?

If none of the conditions in the "else if" statement are true, and there is an "else" statement present, the code block associated with the "else" statement is executed. If there is no "else" statement, the program simply moves on to the next part of the code.

Can I have multiple "else if" statements in a sequence?

Yes, you can have multiple "else if" statements in a sequence. This allows you to check for different conditions and execute different code blocks based on the result of each condition.

What happens if multiple conditions in the "else if" sequence are true?

In most programming languages, when multiple conditions in the "else if" sequence are true, only the code block associated with the first true condition is executed. The program doesn't check the subsequent conditions once a true condition is found.

Is the order of "else if" statements important?

Yes, the order of "else if" statements is important. The program evaluates the conditions in the sequence they are written. It is essential to consider the logical order and place more specific conditions before general ones to ensure correct execution.

Can I use an "else if" statement without an "else" statement?

Yes, you can use an "else if" statement without an "else" statement. The "else if" statements are optional, and you can have them as standalone conditional branches. The program will only execute the code block associated with the first true condition or move on if none of the conditions are true.

Are "else if" statements limited to a certain programming language?

No, "else if" statements are widely used and supported in many programming languages, including C, C++, Java, Python, JavaScript, and more. The syntax might vary slightly, but the concept of evaluating multiple conditions remains the same.

Can I nest "else if" statements inside each other?

Yes, you can nest "else if" statements inside each other. This is known as nested conditional statements. It allows you to have more complex conditional logic and different code blocks executed based on multiple levels of conditions.

How deep can I nest "else if" statements?

The depth of nesting "else if" statements is typically not limited by the programming languages themselves. However, it is considered a good practice to keep the nesting level as shallow as possible to maintain code readability and avoid unnecessary complexity.

Can I have an "else if" statement after an "else" statement?

No, you cannot have an "else if" statement after an "else" statement. Once the program reaches the "else" statement and executes its code block, it will move on to the next part of the code. Therefore, no additional conditions will be checked after the "else" statement.

Can I use "else if" statements in combination with other control structures?

Yes "else if" statements can be used in combination with other control structures like loops or function calls. This allows you to create more sophisticated programs that adapt to different scenarios based on various conditions.

Can I use "else if" statements to check multiple conditions simultaneously?

Yes, you can use "else if" statements to check multiple conditions simultaneously by using logical operators like AND (&&) or OR (||). By combining conditions using these operators, you can create complex conditions that determine which code blocks should be executed.

Can "else if" statements be used outside of programming?

The term "else if" is primarily associated with programming and conditional statements in computing. While the concept of evaluating multiple conditions can be applicable to decision-making in other domains, the specific phrase "else if" is not typically used outside of technology, computing, programming, and communications.

Can I have multiple "else if" statements without a preceding "if" statement?

No, you cannot have multiple "else if" statements without a preceding "if" statement. "else if" statements are meant to be used as an extension of the initial "if" statement. They provide additional conditions to be checked if the initial condition is not met. Therefore, a valid "else if" statement always follows an "if" statement.

Are there any performance considerations when using "else if" statements?

The performance impact of using "else if" statements is negligible. Modern compilers and interpreters are optimized to handle conditional statements efficiently. However, if you have a long sequence of "else if" statements and the conditions are evaluated sequentially, it is worth considering the order of conditions to minimize the number of evaluations required.

Can I use "else if" statements in conjunction with Boolean variables?

Yes, you can use "else if" statements in conjunction with Boolean variables. By utilizing Boolean variables, you can set specific conditions to true or false, and then use "else if" statements to check the state of these variables and execute different code blocks accordingly. This can be particularly useful in complex decision-making scenarios.

Can I use "else if" statements to perform multiple actions based on the same condition?

While "else if" statements are primarily used to check different conditions and execute different code blocks, it is not recommended to use them for performing multiple actions based on the same condition. Instead, consider using separate conditional statements or branching logic to handle multiple actions explicitly.

Can I have nested "else if" statements with different conditions in each level?

Yes, you can have nested "else if" statements with different conditions in each level. Nesting "else if" statements allows you to create more complex decision trees and handle multiple conditions at different levels. Each level can have its own set of conditions and corresponding code blocks to be executed.

{"pageComponentDataId":"f2a97040iaf38-4268-8aa4-dd300dbb82b5","isAssociatedRelease":"true","pageComponentDataLangCode":"en_th","configData":{"jumpType":"currentTab","headlineColor":"black","displayNumber":"","styleMode":"vertical","miniCardHoMode":"2","headline":"","products":[{"number":{"t_id":"len101t0102","language":{"th":"","en_th":"len101t0102","en":"","th_th":"len101t0102"},"id":"Page7e482a24-5af5-4d33-86a4-3471790a1816"}},{"number":{"t_id":"len101t0104","language":{"th":"","en_th":"len101t0104","en":"","th_th":"len101t0104"},"id":"Page45f8851e-4b9b-44a0-ab20-7facb007acf4"}},{"number":{"t_id":"len101t0081","language":{"th":"","en_th":"len101t0081","en":"","th_th":"len101t0081"},"id":"Pagedc7cb422-7f94-44a3-88ce-f9e3a06ffc33"}},{"number":{"t_id":"len101g0036","language":{"th":"","en_th":"len101g0036","en":"","th_th":"len101g0036"},"id":"Pageb7e97ced-9d08-43f3-8c2e-62151abf86af"}}]},"urlPrefix":"AAAAAAALAAAE","needGetLatestTransDataKey":"needGetLatestTransDataValue","title":"glossary-right-blue-boxes-fragment","pageId":"8e408484-13ce-4c08-8240-4640f5264241","urlEdit":0,"uri":"/FragmentDirectory/glossary/glossary-right-blue-boxes-fragment.frag","pageComponentId":"f2a97040iaf38-4268-8aa4-dd300dbb82b5","tplId":"c7389f9a-59c0-4c34-a9e1-f1c090c6ab86","pageComponentUuid":"f2a97040iaf38-4268-8aa4-dd300dbb82b5","targetUser":"0"}
coming coming
Starting at
List Price
Est Value
Web Price:
List Price
Est Value (Estimated Value)
List Price is Lenovo’s estimate of product value based on the industry data, including the prices at which first and third-party retailers and etailers have offered or valued the same or comparable products. Third-party reseller data may not be based on actual sales.
Estimated value is Lenovo’s estimate of product value based on industry data, including the prices at which Lenovo and/or third-party retailers and e-tailers have offered or valued the same or comparable products. Third-party data may not be based on actual sales.
Learn More
See More
See Less
View {0} Model
View {0} Models
shipping.options.for.{0}
Part Number:
Features
See More
See Less
compare
Added!
Great choice!
You may compare up to 4 products per product category (laptops, desktops, etc). Please de-select one to add another.
View Your Comparisons
Add To Cart
Add To Cart
We're sorry,
Products are temporarily unavailable.
Continue Shopping
Learn More
Coming Soon
Featured Product
Featured Products
Oops! No results found. Visit the categories above to find your product.
Save
open in new tab
© 2024 Lenovo. All rights reserved.
© {year} Lenovo. All rights reserved.
Compare  ()
x