

{"id":12587,"date":"2018-04-07T05:17:44","date_gmt":"2018-04-07T05:17:44","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=12587"},"modified":"2021-12-04T10:16:40","modified_gmt":"2021-12-04T04:46:40","slug":"scala-for-loop","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/","title":{"rendered":"Scala for loop &#8211; Types, Syntax and Example of For loop"},"content":{"rendered":"<p>Sometimes, in your code, you may want to execute a set of statements for, say, 100 times. Would you type them a hundred times? Obviously not. This is where loops come in. A loop lets us execute a group of statement a set number of times, or until an expression becomes false.<\/p>\n<p>In this lesson, we will see the Scala for loop with its syntax and examples. Along with this, we will discuss different types of for loop in Scala.<\/p>\n<p>So, let&#8217;s start Scala For Loop Tutorial.<\/p>\n<div id=\"attachment_12595\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12595\" class=\"wp-image-12595 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01.jpg\" alt=\"Scala for loop\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-12595\" class=\"wp-caption-text\">Scala for loop with Syntax and Examples<\/p><\/div>\n<p><strong>Learn: <a href=\"https:\/\/data-flair.training\/blogs\/scala-break\/\">Loop Control statement in Scala<\/a><\/strong><\/p>\n<h3>What is For Loop in Scala?<\/h3>\n<p>Scala for loop lets us execute specific code a certain number of times. It is a control structure in Scala, and in this article, we\u2019ll talk about the forms of for-loop we have here.<\/p>\n<h3>A syntax of Scala For Loop<\/h3>\n<p>Let\u2019s first check out the syntax for Scala for Loop.<\/p>\n<pre class=\"EnlighterJSRAW\">for(var x &lt;- Range){\r\nstatement(s);\r\n}<\/pre>\n<p>The arrow pointing leftward is a generator; it generates individual values from a range. Range is a range of numbers; we may use a list for this. We can also represent this as <i>i to j<\/i>, or as <i>i until j<\/i>.<\/p>\n<h3>Types of For loops in Scala<\/h3>\n<p>There are four types of Scala For Loop:<\/p>\n<h4>a. i to j<\/h4>\n<p>Let\u2019s take an example to demonstrate the syntax for i to j.<\/p>\n<pre class=\"EnlighterJSRAW\">object Main extends App {\r\n    var a=7\r\n    for(a&lt;-1 to 10)\r\n    {\r\n        println(a)\r\n    }\r\n}<\/pre>\n<p>Here\u2019s the output:<br \/>\n1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\n8<br \/>\n9<br \/>\n10<br \/>\n<strong>Learn: <a href=\"https:\/\/data-flair.training\/blogs\/scala-while-loop\/\">While loop in Scala<\/a><\/strong><\/p>\n<h4>b. i until j<\/h4>\n<p>The other syntax we talked about is the until-syntax. Here\u2019s an example:<\/p>\n<pre class=\"EnlighterJSRAW\">object Main extends App{\r\n    var a=0\r\n    for(a&lt;-1 until 10)\r\n    {\r\n        println(a)\r\n    }\r\n}<\/pre>\n<h4>c. Using Multiple Ranges in Scala for loop<\/h4>\n<p>We can use multiple ranges in a Scala for loop. For this, we just separate the ranges with semicolons(;).<\/p>\n<pre class=\"EnlighterJSRAW\">object Main extends App{\r\n    var a=0\r\n    var b=0\r\n    var c=0\r\n    for(a&lt;-1 until 3;b&lt;-7 to 9;c&lt;-12 until 15)\r\n    {\r\n        println()\r\n        println(a)\r\n        println(b)\r\n        println(c)\r\n    }\r\n}<\/pre>\n<p>What would the output be? Combinations of all values:<br \/>\n1<br \/>\n7<br \/>\n12<\/p>\n<p>1<br \/>\n7<br \/>\n13<\/p>\n<p>1<br \/>\n7<br \/>\n14<\/p>\n<p>1<br \/>\n8<br \/>\n12<\/p>\n<p>1<br \/>\n8<br \/>\n13<\/p>\n<p>1<br \/>\n8<br \/>\n14<\/p>\n<p>1<br \/>\n9<br \/>\n12<\/p>\n<p>1<br \/>\n9<br \/>\n13<\/p>\n<p>1<br \/>\n9<br \/>\n14<\/p>\n<p>2<br \/>\n7<br \/>\n12<\/p>\n<p>2<br \/>\n7<br \/>\n13<\/p>\n<p>2<br \/>\n7<br \/>\n14<\/p>\n<p>2<br \/>\n8<br \/>\n12<\/p>\n<p>2<br \/>\n8<br \/>\n13<\/p>\n<p>2<br \/>\n8<br \/>\n14<\/p>\n<p>2<br \/>\n9<br \/>\n12<\/p>\n<p>2<br \/>\n9<br \/>\n13<\/p>\n<p>2<br \/>\n9<br \/>\n14<br \/>\n<strong>Learn: <a href=\"https:\/\/data-flair.training\/blogs\/scala-do-while-loop\/\">do-while loop in Scala<\/a><\/strong><\/p>\n<h4>d. Using Collections<\/h4>\n<p>We can also use a collections object to provide values to the for-loop to iterate on. Let\u2019s take an example with a list.<\/p>\n<pre class=\"EnlighterJSRAW\">object Main extends App{\r\n    var a=0\r\n    val odds=List(1,3,5,7,9)\r\n    for(a&lt;-odds)\r\n    {\r\n        println(a)\r\n    }\r\n}<\/pre>\n<p>The output:<br \/>\n1<br \/>\n3<br \/>\n5<br \/>\n7<br \/>\n9<\/p>\n<h4>e. Using Filters<\/h4>\n<p>Adding extra if-conditions can let us filter out values from a collection.<\/p>\n<pre class=\"EnlighterJSRAW\">object Main extends App{\r\n    var a=0\r\n    val odds=List(1,3,5,7,9,11,13,15,17,19)\r\n    for(a&lt;-odds\r\n        if a&gt;3; if a&lt;15)\r\n    {\r\n        println(a)\r\n    }\r\n}<\/pre>\n<p>And the output:<br \/>\n5<br \/>\n7<br \/>\n9<br \/>\n11<br \/>\n13<\/p>\n<p><strong>Learn: <a href=\"https:\/\/data-flair.training\/blogs\/scala-else-statements-statements\/\">Scala if-else statement<\/a><\/strong><\/p>\n<h4>f. Scala for loop Yield<\/h4>\n<p>The last option is to return a value from a Scala\u00a0for loop, and store it in a variable. We can also return it from a function. Then, we follow this by a yield statement. Note the curly braces.<\/p>\n<pre class=\"EnlighterJSRAW\">object Main extends App{\r\n    var a=0\r\n    val odds=List(1,3,5,7,9,11,13,15,17,19)\r\n    var ret=for{a&lt;-odds\r\n        if a&gt;3; if a&lt;15} yield a\r\n    for(a&lt;-ret)\r\n    {\r\n        println(a)\r\n    }\r\n}<\/pre>\n<p>And the output is:<br \/>\n5<br \/>\n7<br \/>\n9<br \/>\n11<br \/>\n13<\/p>\n<h3>Conclusion<\/h3>\n<p>These are the ways we can implement for loop\u00a0in Scala. Try your own questions, and ask us your doubts in the comments section.<\/p>\n<p><strong><a href=\"https:\/\/www.scala-lang.org\/\">Reference<\/a><\/strong><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1904,&quot;href&quot;:&quot;https:\\\/\\\/www.scala-lang.org&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251206135355\\\/https:\\\/\\\/www.scala-lang.org\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 07:41:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-15 07:30:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 15:55:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-23 02:56:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-27 16:24:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 02:40:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 13:44:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-09 08:06:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-12 14:24:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-17 17:26:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-20 17:57:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-24 15:52:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-30 14:21:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-02 14:58:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-05 16:39:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-12 17:17:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 04:52:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 13:39:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 17:10:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 04:44:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-03 07:25:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 21:46:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 18:02:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-27 20:15:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 11:05:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 19:22:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 07:59:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-17 16:14:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 23:18:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-26 09:13:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-29 14:23:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-07 12:16:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-13 10:20:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-18 15:54:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-22 05:55:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-25 08:30:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-29 13:12:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-02 14:06:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-09 18:23:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-15 16:29:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-19 06:54:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-22 13:14:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-26 04:09:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-29 09:04:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-03 02:40:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-06 20:59:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-09 23:42:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-13 10:49:11&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-13 10:49:11&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, in your code, you may want to execute a set of statements for, say, 100 times. Would you type them a hundred times? Obviously not. This is where loops come in. A loop&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":31238,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[12459,12460,12461,12462,12463],"class_list":["post-12587","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scala","tag-scala-for-loop-array","tag-scala-for-loop-break","tag-scala-for-loop-multiple-variables","tag-scala-for-loop-with-index","tag-scala-for-loop-yield"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Scala for loop - Types, Syntax and Example of For loop - DataFlair<\/title>\n<meta name=\"description\" content=\"Scala for loop: Learn for loops in Scala, Types of Scala for-loop, i to j, i until j, Using Multiple Ranges in Scala for loop with syntax &amp; examples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/scala-for-loop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scala for loop - Types, Syntax and Example of For loop - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Scala for loop: Learn for loops in Scala, Types of Scala for-loop, i to j, i until j, Using Multiple Ranges in Scala for loop with syntax &amp; examples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/scala-for-loop\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-07T05:17:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-04T04:46:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Scala for loop - Types, Syntax and Example of For loop - DataFlair","description":"Scala for loop: Learn for loops in Scala, Types of Scala for-loop, i to j, i until j, Using Multiple Ranges in Scala for loop with syntax & examples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/","og_locale":"en_US","og_type":"article","og_title":"Scala for loop - Types, Syntax and Example of For loop - DataFlair","og_description":"Scala for loop: Learn for loops in Scala, Types of Scala for-loop, i to j, i until j, Using Multiple Ranges in Scala for loop with syntax & examples","og_url":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-04-07T05:17:44+00:00","article_modified_time":"2021-12-04T04:46:40+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Scala for loop &#8211; Types, Syntax and Example of For loop","datePublished":"2018-04-07T05:17:44+00:00","dateModified":"2021-12-04T04:46:40+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/"},"wordCount":440,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-1.jpg","keywords":["scala for loop array","scala for loop break","scala for loop multiple variables","scala for loop with index","Scala for loop yield"],"articleSection":["Scala Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/scala-for-loop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/","url":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/","name":"Scala for loop - Types, Syntax and Example of For loop - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-1.jpg","datePublished":"2018-04-07T05:17:44+00:00","dateModified":"2021-12-04T04:46:40+00:00","description":"Scala for loop: Learn for loops in Scala, Types of Scala for-loop, i to j, i until j, Using Multiple Ranges in Scala for loop with syntax & examples","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/scala-for-loop\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/for-loop-in-Scala-01-1.jpg","width":1200,"height":628,"caption":"Scala for loop with Syntax and Examples"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/scala-for-loop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Scala Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/scala\/"},{"@type":"ListItem","position":3,"name":"Scala for loop &#8211; Types, Syntax and Example of For loop"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=12587"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12587\/revisions"}],"predecessor-version":[{"id":104813,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12587\/revisions\/104813"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/31238"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=12587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=12587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=12587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}