learn-co-curriculum / yield-and-return-values Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
The codes aren't acting the way is said it would in the description. Maybe I'm doing something wrong but not sure.
Also don't know how to submit as learn submit doesn't yield any result.
Although the lab asks students to run this lab following the specs, there are no rspec files in the respository to do so.
Thank you!
The file to be run is called by different names:
ruby lib/practicing_returns.rb
lib/practicing_ruby.rb
ruby lib/practicing_yield.rb
Only the first file is available.
If rspec expects specific terms to be used, such "my_collect" or "languages", the lesson should state it as such. Otherwise, a student ends up spending a lot of time tweaking code, only to discover it's the array name that needed to be changed.
IDE in this lesson has no spec file in it's directory, therefore I'm unable to submit my task.
This lab isn't letting me mark as complete since there are no specs. "Submit pull requests" isn't highlighting and it won't let me do "learn submit"
The Return From Yield Statements lab doesn't work. It returns nil as written. The whole collection array is unnecessary. Here is what I did - I don't know if it's the best way but it works and is much simpler than the method in the lesson which doesn't actually work.
def hello(array)
i = 0
while i < array.length
yield(array[i])
i += 1
end
array
end
hello(["Tim", "Tom", "Jim"]) do |name|
puts "Hi, #{name}"
name
end
The key way explicitly returning name from the yield. You can add it to a collection array if you want but you don't need to. All the explanation is wrong too given that it presents as fact something that doesn't work. I hope this helps! Best, Nancy
Hi! I need help running this test and submit the test.
This is the error message I got.
[07:06:00] (master) yield-and-return-values-online-web-sp-000
// ♥ learn
This directory doesn't appear to have any specs in it.
[07:09:35] (master) yield-and-return-values-online-web-sp-000
// ♥
I was trying to do this lab but I can't fork it.
Trying to use "learn" to run file and drop into Pry but lab doesn't have spec files.
While this learn along lab is trying to show return values originating from using yield blocks, essentially the example doesn't do anything of that sort. Despite creating a "collections" array, and trying to store return values from yield into the collections block, leaving the "hello" method's block same, does not yield any return value anyways. The final "collections" array is still an empty array with three "nil"s. Conceptually, it could have been better explained by changing the block to actually give a return value which would be collected in the "collections" array rather than "nil"
I keep deleting the repository but it is not resetting my file for me to complete this lab
hello i'm done with the this lab, but unable to submit it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.